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
close icon

GridListControl - Column Display Order

How to change the column display order in the GridListControl.

1 Reply

AD Administrator Syncfusion Team January 11, 2007 04:18 AM UTC

Hi Sreeni,

You can derive GridListControl and override the CreateGridColumn member. A column is passed into this member as a parameter. Before calling the baseclass, modify this column in such a manner as to create the columns in the order you want to see them. So, for example, if you want to swap columns 1 & 2, then code such as this should do it.

public class MyGridListControl : GridListControl
{
public override void CreateGridColumn(PropertyDescriptor pd, int column)
{
if(column == 1)
column = 2;
else if(column == 2)
column = 1;

base.CreateGridColumn(pd, column);
}
}


Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon