Let''''s supposed I have a DataTable with columns in the following order:
ID, NAME, DESCRIPTION, RATE, QTY, TOTAL
I am binding this DataTable to a ggc like ddc.datasource = datatable;
However, I want to display selected columns and have control over the order that columns appear in the ggc.
Let''''s supposed that I want to display only the columns below and in the order specified :
TOTAL, QTY, NAME, RATE
I''''ve tried the following but without success
this.gridGroupingControl.Engine.TableDescriptor.VisibleColumns.Reset();
this.gridGroupingControl.TableDescriptor.VisibleColumns[0].Name = "TOTAL";
this.gridGroupingControl.TableDescriptor.VisibleColumns[1].Name = "QTY";
this.gridGroupingControl.TableDescriptor.VisibleColumns[2].Name = "NAME";
this.gridGroupingControl.TableDescriptor.VisibleColumns[3].Name = "RATE";
The ggc is ignoring the code above and displaying all the columns from the DataTable.
Please help!