Hello,
Could you please give me some hints how to enforce gridview control to mark as selected record for which I'm clicking togglebutton to display rowdetails. I found an example for Silverlight in which it work as desired for my WPF app http://www.telerik.com/community/forums/silverlight/general-discussions/togglebutton.aspx
When I click the rowdetails toggle button it shows that details but also marks the parent row as selected.
Regards
Andy
Could you please give me some hints how to enforce gridview control to mark as selected record for which I'm clicking togglebutton to display rowdetails. I found an example for Silverlight in which it work as desired for my WPF app http://www.telerik.com/community/forums/silverlight/general-discussions/togglebutton.aspx
When I click the rowdetails toggle button it shows that details but also marks the parent row as selected.
Regards
Andy
4 Answers, 1 is accepted
0
Hi Andy,
Another possible approach would be to handle the MouseLeftButtonDown event, find the underlying element and its parent row and set its IsSelected property to true.
I hope this helps.
Greetings,
Maya
the Telerik team
There are a couple of possible approaches here, but still the main idea is to find the corresponding row and set its IsSelected property.
Firstly, you can try to handle RowDetailsVisibilityChanged event:
private void clubsGrid_RowDetailsVisibilityChanged(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
{
e.Row.IsSelected = true;
}
Another possible approach would be to handle the MouseLeftButtonDown event, find the underlying element and its parent row and set its IsSelected property to true.
I hope this helps.
Greetings,
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0

AndyL
Top achievements
Rank 1
answered on 13 Dec 2011, 10:00 AM
Hello Maya,
Thanks for your prompt replay. Unfortunately RowVisibilityChanged event is not firing for me.
Do you have any project example you could point me to where it works?
Buy the way is it a right RadGridView control behavior that when in VibileWhenSelected mode togglebutton plus is not switching to minus when record is selected?
Best regards
Andy
Thanks for your prompt replay. Unfortunately RowVisibilityChanged event is not firing for me.
Do you have any project example you could point me to where it works?
Buy the way is it a right RadGridView control behavior that when in VibileWhenSelected mode togglebutton plus is not switching to minus when record is selected?
Best regards
Andy
0
Accepted
Hello Andyl,
Maya
the Telerik team
Generally, the two approaches - working with GridViewToggleRowDetailsColumn and setting RowDetailsVisibilityMode - are mutually exclusive. You need to work only with one of them. Considering firing the RowDetailsVisibilityChanged event - I am attaching a sample project illustrating its implementation.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0

AndyL
Top achievements
Rank 1
answered on 13 Dec 2011, 12:29 PM
Thank you for help. I really appreciate this.
Regards
Andy
Regards
Andy