AD
Administrator
Syncfusion Team
November 9, 2007 10:53 AM UTC
One way you can do this is to handle the grid.Model.QueryCellInfo event and set the properties there.
//subscribe to the event
this.gridDataBoundGrid1.Model.QueryCellInfo += new GridQueryCellInfoEventHandler(Model_QueryCellInfo);
//the event handler
void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if(e.RowIndex == 0 && e.ColIndex > 0)
{
e.Style.CellType = "Header";
e.Style.Text = GridRangeInfo.GetAlphaLabel(e.ColIndex);
e.Style.Font.Bold = true;
}
else if (e.RowIndex > 0 && e.ColIndex == 0)
{
e.Style.CellType = "Header";
e.Style.Text = e.RowIndex.ToString();
}
}