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
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
After you bind the datasourcetable to the grid, you can use the following properties:
2. ugMygrid.DisplayLayout.Bands(0).Columns("Checkbox_Column").Style =
3. ugMygrid.DisplayLayout.Bands(0).Columns("Column Name").Header.Caption = "new header"
See answer here