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

GridViewRow IsSelected

1 Answer 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 09 Jun 2011, 10:20 PM
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

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 10 Jun 2011, 07:36 AM
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
Tags
General Discussions
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or