I am having problem loading data into Nested datagrid. When the user clicks on a row in parent datagrid, The id is retrieved and based on that the nested datagrid is loaded.
In the rowDetailsVisibilityChanged event.
DataGrid nestedDataGrid = e.DetailsElement as DataGrid;
SampleObj data= e.Row.DataContext as SampleObj ;
var client = new MyService.SampleServiceClient();
client.GetReportArchiveDataCompleted += GetSampleDataCompleted;
client.GetSampleDataAsync(data);
How can I add this line in Asyn completed event as I am not able to get the nested Datagrid in completed event.
IEnumerable dataList= e.Result;
nestedDataGrid.ItemSource = dataList
use an anonymous function instead….
Obviously change the delegate to the correct signature (same as your GetSampleDataCompleted.