Copy C1TrueDBGrid Filtered Data

Posted by: richardcastro2003 on 4 March 2020, 6:58 am EST

    • Post Options:
    • Link

    Posted 4 March 2020, 6:58 am EST

    Hi,

    When a user apply filter using the filter bar, is there a way to copy the c1TrueDBGrid.Datasource as filtered? This line of code always return the whole table with no filter

    dt = (DataTable)grid.DataSource;

    dt.DefaultView also returns the whole table.

    Thank you

    Richard

  • Posted 5 March 2020, 3:19 am EST

    Hi Richard,

    As it is directly not possible to achieve the desired scenario so we have developed a custom logic to achieve the same in the attached sample using AfterFilter event of C1TrueDBGrid where we are storing the filtered data into another DataTable. Please have a look at the sample.

    I hope it helps.

    Regards,

    Prabhat Sharma.

    TDBFilteredDataSourceDemo.zip

  • Posted 5 March 2020, 9:56 pm EST

    Hi Prabhat,

    Many thanks for creating a work-around solution.

    Richard

Need extra support?

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

Learn More

Forum Channels