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
195
WinGrid basic questions
posted

Hi,

I am new to WinGrid. I have following basic questions. I am not binding the grid at design time but at run time using code grid.datasource = mydatasourcetable. My source is dynamic set based on the user search criteria selection.

1. How can I hide some of the columns on grid that I am pulling in my data source table?

2. How can I convert  cells of a column to display checkboxes?

3. How can I change the column headings ?

 

Will appreciate any suggestions you may have.

thanks,

Yogesh

  • 880
    posted

    Yogesh:

    Right after you bind the datasource to the grid, do the following:

    1. ugMygrid.DisplayLayout.Bands(0).Columns("Hidden_Column").Hidden  = True

    2. ugMygrid.DisplayLayout.Bands(0).Columns("Hidden_Column").Style =

    Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox

    3. ugMygrid.DisplayLayout.Bands(0).Columns("Hidden_Column").Header.Caption = "New Caption"

    Venki

  • 880
    Suggested Answer
    posted

    Yogesh:

    After you bind the datasourcetable to the grid, you can use the following properties:

    1. ugMygrid.DisplayLayout.Bands(0).Columns("Hidden_Column").Hidden = True

    2. ugMygrid.DisplayLayout.Bands(0).Columns("Checkbox_Column").Style =

    Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox

    3. ugMygrid.DisplayLayout.Bands(0).Columns("Column Name").Header.Caption = "new header"

  • 69832
    Suggested Answer
    Offline posted

    See answer here