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

Access Filtered Dataview

1 Answer 136 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Manishkumar
Top achievements
Rank 1
Manishkumar asked on 02 May 2011, 12:52 PM
Hi Telerik,

I want to access the Result view (i.e;QueryableCollectionView) of telerik grid after filtered and sorting is applied on it. While debugging throught application, when i used "Quick Watch" - I found that i can access QueryableCollectionView it through using

"(new System.Linq.SystemCore_EnumerableDebugView(((Telerik.Windows.Data.QueryableCollectionView)((RadGrid1.ItemsSource))))).Items[0]".

But when writing the code iam getting following errors:1.System.Linq.SystemCore_EnumerableDebugView' is inaccessible due to its protection level .

Please help. Its urgent.

Thanks and Regards,
Manishkumar patel

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 04 May 2011, 09:47 AM
Hello Manishkumar,

When you filter or sort a RadGridView you get the new collection in RadGridView.Items the same way as you have changed it (If you have 30 items in the GridView's datasource and you filter them so that you see only 4 items in the GridView, then in .Items you will have the 4 items). So you should use  RadGrid1.Items[0] for your case.

RadGrid1.Items[0]
 
In general if you want to access the items of a QueryableCollectionView, you could cast it to an Observable Collection. You can access the items of this ObservableCollection then. 

Could you please tell me if this works for you to access the items that you need?

Greetings,
Didie
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
GridView
Asked by
Manishkumar
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or