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

Unvisible DataItemCollection

1 Answer 84 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Oliver
Top achievements
Rank 1
Oliver asked on 20 Jun 2011, 04:06 PM
Hi,

actually in my wpf application, users can apply changes  to any rows they want and eventually when they click on a "Save" button to apply pending changes.

To acheive that, I loop into "Items" property to check any row object for a specific flag in my object. The problem I have is, if the users apply a column filter before they click on the "Save" button, some changes can be missing because they are outside the filter range.

So, "Items" property contain only visible rows in GridView. Do we have acces to another DataItemCollection that contain all the data without the filters???

Thank's

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 21 Jun 2011, 07:20 AM
Hello Oliver,

 You may find all the containing data without the filters in the grid.ItemsSource. You just need to do the appropriate cast and you may work with the items in the ItemsSource.

Another approach would be to find the original source inside the DataContext of the GridView. If the GridView is bound to Clubs in the DataContext "MyViewModel", then you may access the data like this:

ObservableCollection<Club> clubs = (clubsGrid.DataContext as  MyViewModel).Clubs;
 
I hope that this is answering your question.  Regards,
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
Oliver
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or