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

2 posts, 1 answers
  1. Jose Simas
    Jose Simas avatar
    35 posts
    Member since:
    Mar 2009

    Posted 20 Sep 2010 Link to this post

    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

  2. Answer
    Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 20 Sep 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top