We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SortBehavior disabled when I set gridDataBoundGrid.DataSource = one object

Thread ID:

Created:

Updated:

Platform:

Replies:

75321 Jul 21,2008 05:38 PM UTC Nov 17,2008 08:45 AM UTC WinForms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On July 21, 2008 05:38 PM UTC

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.



Jisha Joy [Syncfusion]
Replied On 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


Administrator [Syncfusion]
Replied On 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




Jisha Joy [Syncfusion]
Replied On 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


Hyung-Jin Lee
Replied On 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





Jisha Joy [Syncfusion]
Replied On 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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;