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.
Unfortunately, activation email could not send to your email. Please try again.

How do i set a defult sort column

Thread ID:





89971 Sep 11,2009 10:45 AM Sep 14,2009 01:15 AM WPF 1
Tags: GridControl
Administrator [Syncfusion]
Asked On September 11, 2009 10:45 AM

Can i set a column so that on load of the model it sets that column as to sorted.


Ganesan K [Syncfusion]
Replied On September 14, 2009 01:15 AM

Hi Andrew,

Thanks for using Syncfusion products.

You can listen the Model_Initialized event and set the column to be sorted as below,

dataGrid.Model.Initialized += new EventHandler(Model_Initialized);

void Model_Initialized(object sender, EventArgs e)
var sortColumn = new GridDataSortColumn()
ColumnName = "OrderID",
SortDirection = ListSortDirection.Ascending

Please let me know if you need any more details.



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.

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.