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

Accessing filtered rows

1 Answer 124 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Saurabh Srivastava
Top achievements
Rank 1
Saurabh Srivastava asked on 17 Sep 2009, 01:57 PM
Hi,

Suppose I have 20 records in my grid. I apply a filter/sort. I get 10 records. Is there a way to access "only" these 10 records out of the complete dataset?

Context: While editing, my user wants to update a field in only one record, click on a checkbox to say "Apply to all filtered records" and wants the changes to be applied to the filtered dataset.

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 23 Sep 2009, 08:23 AM
Hello Saurabh,

Thank you for contacting us and for your question.
Unfortunately, this behavior is not available out-of-the-box. It can be achieved through custom code.
One possible option is as follows.
You can query the underlying datasource, using the filter expression of the grid. This would return only the filtered rows. Based on them (for example based on the key fields), you can access and manually update all the records, in this filtered subset. Rebinding the grid control will ensure that the data is properly refreshed.
Give this suggestion a try and let me know how it goes.

Kind regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Saurabh Srivastava
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or