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

How to add an unbound column as the first column

Hi,
In the following code snippet I am binding a GGC to a Dataset then adding an unbound checkbox column to the GGC. This adds the new column to the END of the grid. How do I add it to the START of the grid - i.e. make it the left-most column?

GGC.DataSource = dataset1;
GGC.DataMember = dataset1.Tables[0].TableName;

//adding unbound column and setting type. GGC.TableDescriptor.UnboundFields.Add("Resubmit"); GGC.TableDescriptor.Columns["Resubmit"].Appearance.AnyRecordFieldCell.CellType = "CheckBox";

1 Reply

AD Administrator Syncfusion Team July 5, 2007 11:50 AM UTC

One way to do this is to use the Columns.Move command.

GGC.TableDescriptor.UnboundFields.Add("Resubmit");
GGC.TableDescriptor.Columns["Resubmit"].Appearance.AnyRecordFieldCell.CellType = "CheckBox";
GGC.TableDescriptor.Columns.Move(gridGroupingControl1.TableDescriptor.Columns.Count - 1, 0);

Loader.
Live Chat Icon For mobile
Up arrow icon