Hi,
If I have data with the following columns A, B, and C but would like to display B, C, and A in the xmalWebGrid. How can I do this in the code? Thanks for you help.
You can use the Columns collection to reorder your columns:
this.DataGrid1.Columns.Remove(colB);
this.DataGrid1.Columns.Insert(0, colB);
-SteveZ
Hi Stephen,
Thank you for your suggestion. Actually, it works the first time.
this.DataGrid1.Columns.Remove(colA);
this.DataGrid1.Columns.Insert(1, colA);
this.DataGrid1.Columns.Remove(colC);
this.DataGrid1.Columns.Insert(2, colC);
When I click to rebind again, the DataGrid1 shows ColA, ColB, and ColC instead. Is this a bug? Thanks for your help.