DataTable with paging not sorting nor filtering when null source values

Hi,

I want to be able to paginate my SfDataGrid and even though the doc says that SfDataPager doesn't work with DataTable binding, I tried it and surprisingly it works for most of it.

The problem I have is with columns where I have null values ​​for certain rows. In these cases, the column sorting and filtering  does not work. I have tried updating the column in order to AllowNullValues but seems it is not enough.

  • Am I missing something or should I try another approach? Note that if I remove the paging from my SfDataGrid it works well.
  • Do the SfDataGrid and SfDataPager work fine with dynamic object collection?

1 Reply

SG Santhosh Govindasamy Syncfusion Team August 6, 2024 10:30 AM UTC

Hi Álvaro Sánchez López,


Query

Response

I want to be able to paginate my SfDataGrid and even though the doc says that SfDataPager doesn't work with DataTable binding, I tried it and surprisingly it works for most of it.

The problem I have is with columns where I have null values ​​for certain rows. In these cases, the column sorting and filtering  does not work. I have tried updating the column in order to AllowNullValues but seems it is not enough.

 

Thank you for your information.

 

We would like to inform you that the DataGrid has certain limitations, such as when using SfDataPager with the DataGrid control. Specifically, SfDataPager does not accept a DataTable as a source. Additionally, there are limitations with data processing operations (sorting, filtering), which is why you were unable to perform these data operations.

 

To proceed further, as per your update on binding the DataTable as the source for SfDataPager, could you please share the details on how you bound the DataTable as the source of SfDataPager along with the code snippet? This information will be helpful for us to proceed further.

 

For your reference, I have attached the UG link for handling "Paging in DataGrid."
https://help.syncfusion.com/wpf/datagrid/paging?cs-save-lang=1&cs-lang=csharp#getting-started

Do the SfDataGrid and SfDataPager work fine with dynamic object collection?

 

SfDataGrid and SfDataPager work perfectly with dynamic object collections.

For your reference, I have attached the UG link for handling "Data Binding."

https://help.syncfusion.com/wpf/datagrid/data-binding#binding-with-dynamic-data-object


Regards,
Santhosh.G



Loader.
Up arrow icon