Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
WebCombo InitializeDataSource
posted

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!

 

 

Parents
No Data
Reply
  • 21382
    Verified Answer
    posted

     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);
            }

Children
No Data