GridViewRow IsSelected

2 posts, 0 answers
  1. Jeremy
    Jeremy avatar
    5 posts
    Member since:
    Jun 2011

    Posted 09 Jun 2011 Link to this post

    Hello,

    I have a RadGridView with a button in each row, and when I click the button, I need to set the corresponding row to be selected. I've seen several examples with something similar to the following:

    private void CollapseBtn_Click(object sender, RoutedEventArgs e)
    {
        var senderElement = e.OriginalSource as FrameworkElement;
        var row = senderElement.ParentOfType<GridViewRow>();
        if (row != null)
        {
            row.IsSelected = true;
        }
       ....

    However when using that, the selected item of the grid never changes. I also did some digging through each of the rows when the grid has a SelectedItem, and IsSelected was false for every row. Is this a bug, or am I missing something? Thanks!

    Jeremy
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 10 Jun 2011 Link to this post

    Hello Jeremy,

    I have tested the scenario you described, but I was not able to reproduce the issue. May you take a look at the sample attached and try to get the same behavior ? Are there any additional steps that I need to follow in order to get the same scenario ?

     

    Kind regards,
    Maya
    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
Back to Top