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

setting a row as selected when viewing its rowdetails

2 Answers 84 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jorge Alberto
Top achievements
Rank 1
Jorge Alberto asked on 23 Jul 2010, 08:34 AM
Hello :)

I have use a GridViewToggleRowDetailsColumn in my gridview to enable the user to see the rowDetails of each row.
I would like to know how can I set a row as selected when the user click the button generated by the GridViewToggleRowDetailsColumn.

For example I have 5 rows and the current selected row is the first row, so when the user wants to see the details of the fifth row, he make visible the row detail by pressing the button generated by the GridViewToggleRowDetailsColumn and just before the user releases the mouse button I want to make this row the current selected one.

Is this possible? I hope you can help me.

Best Regards
Jorge

2 Answers, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 23 Jul 2010, 09:33 AM
Hi Jorge Alberto,

You can use the RowDetailsvisibilityChanged event to automatically select a row when its details are expended:

// subscribe for RowDetailsVisibilityChanged
private void playersGrid_RowDetailsVisibilityChanged(object sender, GridViewRowDetailsEventArgs e)
{
    e.Row.IsSelected = true;
}


Kind regards,
Milan
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
0
Jorge Alberto
Top achievements
Rank 1
answered on 23 Jul 2010, 04:51 PM
Hi Milan

Thank you for your answer, it works!

Best regards,
Jorge
Tags
GridView
Asked by
Jorge Alberto
Top achievements
Rank 1
Answers by
Milan
Telerik team
Jorge Alberto
Top achievements
Rank 1
Share this question
or