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

Dynamic GridViewRowDetails

1 Answer 26 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ramin Razi
Top achievements
Rank 1
Ramin Razi asked on 30 Jul 2010, 07:18 PM
Hello,
On my gridview I have it check when a row is selected for a specific value in a column. It then changes the Row Detail View template based on the value. I know you can do a bind on the detail view user control in xmal. However is there a way to get the object that was selected in the grid view to the user control so I can load sub data in code?

1 Answer, 1 is accepted

Sort by
0
Ramin Razi
Top achievements
Rank 1
answered on 30 Jul 2010, 10:40 PM
Never mind I figured it out.

Just used the event (GridView1_LoadingRowDetails)

void GridView1_LoadingRowDetails(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
{
 CustomDetailsTemplate userControl = (CustomDetailsTemplate) e.DetailsElement;
 userControl.DoMethod();
}
Tags
GridView
Asked by
Ramin Razi
Top achievements
Rank 1
Answers by
Ramin Razi
Top achievements
Rank 1
Share this question
or