Hi,
I'm having the same issue here as the initial post, but i still cant quite understand how to do that...
I have a radgridview and a rowDetailsTemplate. The RowDetailsTemplate contains another grid which i need to bind dynamically on LoadingRowDetails using a web service call.
so in the LoadingRowDetails method, i have indeed access to e.Row and e.DetailsElement in that method. But then i call my web service and once the web service return, i'm in the method <methodName>Completed. So it's actually in this method that i want to bind the grid within the RowDetailsTemplate. But then in that method i can't find out how to access the template...
I just started working with grid and row details, so my question might seem obvious to some, but i'm at a loss.
Any suggestion ?
Thanks for your help.
---------------MainPage.xaml.cs---------------------
private
void ResultGrid_LoadingRowDetails(object sender, GridViewRowDetailsEventArgs e)
{
string param = e.Row.GetCellFromPropertyName("column1").Value.ToString();
RadTabControl rowTabControl = e.DetailsElement as RadTabControl;
RadGridView rowDetailsGrid = rowTabControl.FindName("jobGrid") as RadGridView;
(...)
// Call WS
WrapperReference.
WrapperWSClient cl = new Results.WrapperReference.WrapperWSClient();
cl.GetGridCompleted +=
new EventHandler<Results.WrapperReference.GetGridCompletedEventArgs>(cl_GetGridCompleted);
cl.GetGridAsync(param
);
}
void cl_GetGridCompleted(object sender, SL_Results.ERCWrapperReference.GetGridCompletedEventArgs e)
{
????? i need to create the grid column and bind them dynamically.
}
---------------MainPage.xaml---------------------
<
telerikGridView:RadGridView x:Name="grid1"
LoadingRowDetails="ResultGrid_LoadingRowDetails">
<telerikGridView:RadGridView.Columns>
<telerikGridView:GridViewToggleRowDetailsColumn />
</telerikGridView:RadGridView.Columns>
<telerikGridView:RadGridView.RowDetailsTemplate>
<DataTemplate>
<telerikNavigation:RadTabControl x:Name="DetailsTabs">
<telerikNavigation:RadTabItem x:Name="item1"
Header="Details">
<TextBlock x:Name="tb" Text="Hello!" />
</telerikNavigation:RadTabItem>
<telerikNavigation:RadTabItem x:Name="abc"
Header="abc">
<telerikGridView:RadGridView x:Name="item2">
</telerikGridView:RadGridView>
</telerikNavigation:RadTabItem>
</telerikNavigation:RadTabControl>
</DataTemplate>
</telerikGridView:RadGridView.RowDetailsTemplate>
</telerikGridView:RadGridView>