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

How to select a row depending on the value of one column

1 Answer 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jose Simas
Top achievements
Rank 2
Jose Simas asked on 20 Sep 2010, 04:49 PM

Hi,

I would like to select all the rows that contain a true value in a specific column using XAML. I am able to do this in code like so:

grid.SelectedItems.Clear();
foreach (var item in grid.Items.Cast<MyBusinessObject>().Where(c => c.IsSelected))
    grid.SelectedItems.Add(item);

But I would rather have the row selection directly bound to the underlying object. Is this possible?

Thanks,
Jose

1 Answer, 1 is accepted

Sort by
0
Accepted
Yavor Georgiev
Telerik team
answered on 20 Sep 2010, 05:14 PM
Hi Jose Simas,

 Please check out this blog post for a sample approach on how to bind SelectedItems in MVVM. Don't hesitate to contact us again if you need further assistance in implementing your scenario.

Best wishes,
Yavor Georgiev
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
Jose Simas
Top achievements
Rank 2
Answers by
Yavor Georgiev
Telerik team
Share this question
or