SortBehavior disabled when I set gridDataBoundGrid.DataSource = one object
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.
Could anybody tell me why and how I can sort it out? Thanks.
SIGN IN To post a reply.
5 Replies
JJ
Jisha 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
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
AD
Administrator
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
>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
JJ
Jisha Joy
Syncfusion Team
October 29, 2008 12:17 PM UTC
Hi,
Please refer the following forum thread:
http://www.syncfusion.com/support/forums/message.aspx?MessageID=38413
Let me know if this helps.
Regards,
Jisha
Please refer the following forum thread:
http://www.syncfusion.com/support/forums/message.aspx?MessageID=38413
Let me know if this helps.
Regards,
Jisha
HL
Hyung-Jin Lee
November 14, 2008 06:03 AM 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
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
JJ
Jisha Joy
Syncfusion Team
November 17, 2008 08:45 AM UTC
Hi Chin,
Following forum is updated for your query. Please refer it
http://www.syncfusion.com/support/forums/message.aspx?MessageID=77751
Regards,
Jisha
Following forum is updated for your query. Please refer it
http://www.syncfusion.com/support/forums/message.aspx?MessageID=77751
Regards,
Jisha
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
AD Administrator
- Jul 21, 2008 05:38 PM UTC
- Nov 17, 2008 08:45 AM UTC