This is a migrated thread and some comments may be shown as answers.

Access Grid's Filtered Data

1 Answer 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adam Gross
Top achievements
Rank 1
Adam Gross asked on 23 Aug 2010, 03:51 PM
I have 5000 records in a grid with paging turned on.  I need to access the datasource from the grid with the filter applied, while maintaining paging.  accessing radGrid.MasterTableView doesn't work since it only holds the records that are currently displayed.  I have tried getting a DataTable from the radGrid.DataSource, but the filter isn't applied at that stage.  I have considered writing a parser for the filter and applying it before I get the datasource, but that doesn't make sense.  Is there a way to get the data before it gets shortened for paging?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 26 Aug 2010, 08:37 AM
Hello Adam,

RadGrid does not expose its resolved data source, thus you cannot access only filtered data source.
If you are using NeedDataSource to populate RadGrid you can get there RadGrid.MastarTableView.FilterExpressions and apply them on the original data source in order to manually filter the data source.

Other option is to handle filter ItemCommand and build manually filter expressions that will be applied later on original source.

Best wishes,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Adam Gross
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or