Datagrid binding to DataTable error reporting

We are developing 2D table to show mesurments results in XY coordinates view. The column and row number are config parameters, so we allow user to choose the amount of them. We bind ItemSourceProperty of SfDataGrid like this:
dataGrid.SetBinding(SfDataGrid.ItemsSourceProperty, nameof(IAntennaBaseViewModel.DataTable), BindingMode.OneWay);
So we don't have columns names as properties in viewmodel or properties of the item (which is just float).
Despite the performance problems as OnQueryRowStyle(object sender, QueryCellStyleEventArgs e) is being called for each cell of the grid once only one item of source (DataTable) is changed, in general it works. But repots the binding error:
Binding: 'Column7' property not found on 'System.Data.DataRowView', target property: 'Syncfusion.SfDataGrid.XForms.SfLabel.Text'
Binding: 'Column1' property not found on 'System.Data.DataRowView', target property: 'Syncfusion.SfDataGrid.XForms.SfLabel.Text'
....
Would you mind sugesting any kind of solution on:
1) How to stop reporting binding error
2) How to prevent updating styles of whole grid when only 1 item was changed.
Thanks for fast reply in advance.

Attachment: table_bfba2a2e.zip

1 Reply

SY Suthi Yuvaraj Syncfusion Team October 3, 2022 03:17 PM UTC

Hi Serhii,


#Regarding Binding error 'System.Data.DataRowView'


We would like to let you know that binding error will occur when the model property is not properly set to datatable column, Please could you check the model property bound properly and Let us know if your still face any difficulties.


If yes , please share the details regarding the data binding of model property and if possible please share the sample to find the appropriate solution as soon as possible.


# Regarding updating style to particular cell


We would like to let you know that for upgrading the style to a particular cell without changing the whole grid by DataGrid_QueryCellStyle. Please refer the below documentation for more reference.


UG Link: https://help.syncfusion.com/xamarin/datagrid/conditional-styles#how-to-style-a-particular-cell-based-on-cellvalue


Please let us know if you need further assistance.


Regards,

Suthi Yuvaraj.


Loader.
Up arrow icon