I bind a data table to WebCombo control. I need to customize display of the multiple columns.
For Example, now I have default display as Col1, Col2, Col3. I need to display as col3, Col1, Col2. How I add codes on InitializeDataSource
hander to do it?
Thanks!
If you are binding to your datatable at design time, the easist way is to just go into the ASPX and move the column to the position you want it at. Or you could open the Columns collection in the Properties window and shift the columns position using that dialog.
If you need to do it at run time, you can call the .Move function off the column object in the InitializeLayout event.
protected void WebCombo1_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e) { e.Layout.Bands[0].Columns.FromKey("yourColumnKey").Move(0); }