This question is locked. New answers and comments are not allowed.
I need to bind the the contents of the RowDetailsTemplate (which is a user control) to an object that is contained by the object to which the Grid is bound. I tried doing this in the LoadRowDetails event handler, but when I do, expanding the view does not work. This is what I am doing in the event handler:
As I said, the code doesn't fail but I can no longer expand the row details. Any ideas what I'm doing wrong? Is there a different approach to what I need to do? Thanks.
-- xavier
private void DetailsGrid_LoadingRowDetails(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e){ BaseUserControl baseUserControl = e.DetailsElement as BaseUserControl; Link link = baseUserControl.DataContext as Link; if (link is LinkIncidentToPerson) { e.DetailsElement.DataContext = ((LinkIncidentToPerson)link).Incident; }}As I said, the code doesn't fail but I can no longer expand the row details. Any ideas what I'm doing wrong? Is there a different approach to what I need to do? Thanks.
-- xavier