0
votes

In UWP I was able to bind the Columns of the SfDataGrid to a property in the ViewModel using this example: https://www.syncfusion.com/kb/7811/how-to-bind-a-column-collection-from-viewmodel

However, following the same approach for SfDataGrid in Xamarin.Forms results in an exception : "System.Exception: SfDataGrid.Columns can't be null".

Is the ViewModel binding of the Columns not supported in Xamarin.Forms? If yes, what alternatives do I have to create the grid using dynamic columns?

Thanks in advance.

1

1 Answers

0
votes

Thanks for using Syncfusion products.

We have checked your query with “SfDataGrid in Xamarin.Forms results in an exception : "System.Exception: SfDataGrid.Columns can't be null while binding Columns”, and it is working fine from our side. We have prepared a sample for bind columns from view model property and please find the sample from the below link.

Sample Link: BindingColumns

Please let us know if this helpful.

Regards

Vigneshkumar R