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. Image for the cookie policy date

Sorting drop down control in the grid

Like a normal drop down control is there any way to set the "Sorted" property to true for the drop down cells on the grid?

1 Reply

AD Administrator Syncfusion Team October 30, 2006 07:09 AM UTC

Hi Paulo,

We apologize for the delay in responding to you and also we thank for your patience.

To sort the dropdown control of the Grid, you need to handle the CurrentCellShowingDropDown event. Below is a code snippet

GridDropDownGridListControlCellRenderer cr = this.gridControl1.CurrentCell.Renderer as GridDropDownGridListControlCellRenderer;
if(cr != null)
{
DataTable dt = cr.ListControlPart.DataSource as DataTable;
dt.DefaultView.Sort = "[ColumnName] DESC";
}

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon