Filtering Grid using Column header

Posted by: Victor.m.charles.civ on 7 September 2019, 12:19 pm EST

  • Posted 7 September 2019, 12:19 pm EST

    Hello,

    Is it possible to search a FlexGrid by selecting value(s) from multiple column headers using Boolean logic? I'm trying to convert same capabilities from the C1TrueDBGrid on a Windows App to my FlexGrid in an ASP.NET MVC application.

    Thanks,

    Victor
  • Replied 8 September 2019, 10:33 pm EST

    Hi,
    The FlexGrid allows to filter the each column same as Excel using the Filter icon next to the Column. Please refer to the following demo sample for reference:
    https://demos.componentone.com/ASPNET/MVCExplorer/FlexGrid/Filter

    Hope it helps!

    Regards,
    Manish Gupta
  • Replied 9 September 2019, 2:36 pm EST

    Hi,

    Is it possible to send me a sample project?

    Thanks,

    Victor
  • Replied 9 September 2019, 6:33 pm EST

    Hi Victor,
    Please find the attached sample and attached GIF image.



    The project required the C1.Web.Mvc dll.

    Regards,
    Manish Gupta

    FlexGridFilter-PDF Export-ComboBox.zip
  • Replied 10 September 2019, 2:02 pm EST

    Hi,

    Thank you for the sample project. I am receiving the error message below on line:
    @Html.C1().ComboBox().Id("cmb").Bind(b=>b.Bind(cmbSource).DisableServerRead(true)).OnClientSelectedIndexChanged("SelectedIndexChanged").IsEditable(false).

    Which files do I need to include in my project?

    Error:
    System.Reflection.TargetInvocationException: 'Exception has been thrown by the target of an invocation.'
    Inner Exception
    LicenseException: A valid license cannot be granted for the type C1.Web.Mvc.LicenseDetector. Contact the manufacturer of the component for more information.

    Victor
  • Replied 10 September 2019, 2:44 pm EST

    Hi again,
    How do you modify the code to load the control from a datatable or xml file?
    Thanks,
    Victor


  • Replied 11 September 2019, 6:21 pm EST

    Hi Victor,
    Please find the attached sample which converts the DataTable and XML files data to List of Objects to show in FlexGrid.

    For DataTable, we have a Generic class conversion method to convert DataTable to C# List.
    For XML file, we need to create classes to map the Class properties with XML nodes. And convert the Data using XmlSerializer class.

    Regards, Licensing Error,
    As per your queries and account information as we find that you were using the older WinForm edition C1TrueDBGrid.

    Hence, please make sure that you have installed the ComponentOne MVC controls on your machines.

    Please also share if the installation is done on a separate machine for getting trial?

    Regards,
    Manish Gupta
  • Replied 24 September 2019, 12:34 pm EST

    Hi Manish,

    Sorry for the late reply, but I did not receive the file you attached in your last message which included accessing data from a table.

    Thanks,

    Victor.
  • Replied 24 September 2019, 3:11 pm EST

    Hi Victor,
    Sorry for the inconvenience because of missing sample.
    Please find the sample attached here:
    Grid-FromXML-DataTable.zip

    Regards,
    Manish Gupta

    Grid-FromXML-DataTable.zip
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels