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

Retrieving the filtered list of items

2 Answers 74 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tormod
Top achievements
Rank 2
Tormod asked on 01 Mar 2012, 07:17 PM
http://www.telerik.com/community/forums/wpf/gridview/filtered-records-list.aspx

I found an old forum thread describing the problem, but its from 2009.

Within a DataTemplate I have GridView.
Within the same datatemplate I have a button where I want to do a bulk operation on the filtered set of items.
The datacontext of the DataTemplate is an INotifyPropertyChanged derived object, which provides the GridView ItemsSource.

How do I, when handling the button click, obtain the list of filtered items back from the RadGridView?

The DataTemplate is hosted within the body of a data driven RadTabControl, if it matters.

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 02 Mar 2012, 08:00 AM
Hi,

 You can use the grid Items collection to achieve your goal. 

Greetings,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Tormod
Top achievements
Rank 2
answered on 02 Mar 2012, 08:05 AM
Hi.

Thank you for your answer. Sorry about not being specific.
How do I obtain the reference to the radgridview from the button handler code behind?

That's why I thought it was relevant that I was within a datatemplate.
Unless I have forgotten something obvious, adding an x:Name to the gridview will not help.
Tags
GridView
Asked by
Tormod
Top achievements
Rank 2
Answers by
Vlad
Telerik team
Tormod
Top achievements
Rank 2
Share this question
or