We have analyzed your query. In your query, the LoadDynamicItems is invoked only after await is completed. So you have to call the PagedSource.Refresh () method after invoking the LoadDynamicItems method like the below code example,
We already have a kb to load the pages in OnDemand using async and await and the kb kink as below,
Jai Ganesh S
We are adding the ItemsSource as asynchronously in detailsviewdatagrid as like in the following kb https://www.syncfusion.com/kb/2394/how-to-load-detailsview-itemssource-asynchronously) and the details view items are loaded as expected. Could you please modify the below sample to reproduce the reported issue. This would be more helpful for us to analyze further.
Jai Ganesh S
We analyzed your query. In that KB Sample, We have removed the Sleep method and used Task.Delay. It is not possible to provide complete list to SfDataGrid asynchronously, But you can add items to SfDataGrid details view asynchronously without blocking current thread for getting items from service.
private void SfGrid_DetailsViewExpanding(object sender,
var list = new ObservableCollection<dynamic>();
var underlyingList = GetItems(list);
private async Task<ObservableCollection<dynamic>> GetItems(ObservableCollection<dynamic> dynamicList)
dynamicList.Add(CreateDynamicObj("David", 1001, "Asst.Manager", 118));
dynamicList.Add(CreateDynamicObj("Alex", 1002, "Senior Developer", 123));
dynamicList.Add(CreateDynamicObj("Christopher", 1003, "Senior Developer", 121));
dynamicList.Add(CreateDynamicObj("Mary", 1004, "Accountant", 120));
dynamicList.Add(CreateDynamicObj("Angeline", 1005, "Asst.Manager", 105));
dynamicList.Add(CreateDynamicObj("Andrew", 1006, "Manager", 103));
dynamicList.Add(CreateDynamicObj("Michael", 1007, "Senior Developer", 124));
Please refer the modified sample from the below location,
Regarding query: . I would need a way to update/refresh the detail grid when GetItems() actually returns, like I can refresh the data pager once I have received the data.
In the GetItems method, you can add items once you receive data from service.