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.
Syncfusion Feedback

How do i set a defult sort column

Thread ID:

Created:

Updated:

Platform:

Replies:

89971 Sep 11,2009 02:45 PM UTC Sep 14,2009 05:15 AM UTC WPF 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 11, 2009 02:45 PM UTC

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

Thanks

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

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
};
dataGrid.Model.TableProperties.SortColumns.Add(sortColumn);
}


Please let me know if you need any more details.

Thanks
Ganesan

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

;