CBClay Burch Syncfusion Team June 26, 2002 06:12 AM
> For a Grid, how do I programmatically control the
> Column headers (replace the A-Zs)?
In Essential Grid, you can view the column headers as row zero. So, if you want col header 1 to have the header "Price", you can set the Text property for the style of cell 0,1 to "Price".
gridControl1[0,1].Text = "price";
or in VB,
gridControl(0,1).Text = "price"
SHSam HortonJune 26, 2002 07:55 AM
Thanks - Great tip!
I also have a GridDataBoundGrid, but the object is quite different. For that type of control, how does one programmatically:
(a) Set column text
(b) Make the grid read-only
(c) Freeze a column or row
(d) Apply styles to cells, columns and rows
If these are operations only possible in the Grid let me know and I'll use it instead.
CBClay Burch Syncfusion Team June 26, 2002 01:11 PM
The GridDataBoundGrid is more of a column oriented grid. To set column properties, you can use the designer and work with the GridBoundColumns property. Using the editor, add a GridBoundColumn for each of your columns. Make sure you set the MappingName for each column so the column can be matched to the datasource. You can also set style properties for each column here as well.
So, GridDataBoundGrid is basically a column centric grid, but you can do special things with events to catch specific cell appearance if needed.