The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I set this.gridDataBoundGrid1.DataSource = Source, where Source is defined as List and is an object list contains information such 'UserID', 'FullName' etc. After I doing this, the grid can be built up normally with correct information. However, the "this.gridDataBoundGrid1.SortBehavior = Syncfusion.Windows.Forms.Grid.GridSortBehavior.DoubleClick" is not working any more.
Could anybody tell me why and how I can sort it out? Thanks.
JJJisha Joy Syncfusion Team July 22, 2008 11:59 AM UTC
Hi Preston,
By default sorting is done in a GridDataBoundGrid through the IBindingList.Sort method on the underlying datasource for the grid. This means that the sorting is done on the actual values that are in the datasource (and not the foreign key value which ,is gotten from another datasource). If the dataSource is a DataTable, then this means that the sort is effectively being done by setting the DataView.Sort property on the dataTable.DefaultView.
If your DataGrid is bound to some IList collection and you want your DataGrid to support sorting , you will have to implement the IBindingList.AllowSorting property and the IBindingList.ApplySort method (in addition to the other interface members).
Let me know if you need further assitance.
Regrads, Jisha
ADAdministrator Syncfusion Team October 27, 2008 09:26 AM UTC
Can you explain this a bit further. I have a gridDataBoundGrid which is bound to a BindingList. I need to be able to sort!
>Hi Preston,
By default sorting is done in a GridDataBoundGrid through the IBindingList.Sort method on the underlying datasource for the grid. This means that the sorting is done on the actual values that are in the datasource (and not the foreign key value which ,is gotten from another datasource). If the dataSource is a DataTable, then this means that the sort is effectively being done by setting the DataView.Sort property on the dataTable.DefaultView.
If your DataGrid is bound to some IList collection and you want your DataGrid to support sorting , you will have to implement the IBindingList.AllowSorting property and the IBindingList.ApplySort method (in addition to the other interface members).
Let me know if you need further assitance.
Regrads, Jisha
JJJisha Joy Syncfusion Team October 29, 2008 12:17 PM UTC
Hello. Thank you for asking the same qustion that I want to ask, and show us good answers and sample. But I didn't still make it yet. . .. T_T In my case, I use BindingList <> as DataSource of GridDataBoundGrid, but BindingList doen't have Sort() and similar methord . Do I have to use only ArraryList ? If you have another solution, Please help me. Thank you
JJJisha Joy Syncfusion Team November 17, 2008 08:45 AM UTC
Hi Chin,
Following forum is updated for your query. Please refer it