Hi there
I have a problem with the SfDataPager and/or the SfDataGrid.
I have a collection of objects of the type DataModel. This model has a propertycalled ClientSubmitDate, which is bound to the column. When the sfDataPager doesn't load data OnDemand it works fine. But when using OnDemandLoading and LoadDynamicItems the problem occours.
I doesnt matter what type of collection I'm using, both ObservableCollection and List throws the error.
Exception Message:
An exception of type 'System.ArgumentException' occurred in System.Core.dll but was not handled in user code
Additional information: 'ClientSubmitDate' is not a member of type 'System.Object'
Method Calling LoadDynamicItems:
private async void sfDataPager_OnDemandLoading(object sender, Syncfusion.UI.Xaml.Controls.DataPager.OnDemandLoadingEventArgs args)
{
var data = (await Controller.DatabaseController.GetDataModelsForFormModel(Form, false, args.PageSize, args.StartIndex));
sfDataPager.LoadDynamicItems(0, data);
}
If you need a sample model, my DataModel class could (for this example) be expressed like:
public class DataModel
{
public DateTime ClientSubmitDate { get; set; }
}
Please notice, that the bindings work without problems when NOT loading data on demand. The datatype that I submit as a argument in LoadDynamicData both fails with List<DataModel> and ObservableCollection<DataModel>.
Thanks in advance.