Hi Julie,
Thanks for the interest in Syncfusion Grid.
You can set the Border of the ColumnHeader by handling PrepareViewStyleInfo event. Please refer the following code snippet that shows how we can hanlde PrepareViewStyleInfo event to set the ColumnHeader of the Grid.
private void Form1_Load(object sender, System.EventArgs e)
{
for (int i = 1; i <= this.gridControl1.ColCount; i++)
this.gridControl1[0, i].CellValue = string.Format("{0}", Convert.ToChar(64 + i));
for (int i = 1; i <= this.gridControl1.ColCount; i++)
{
this.gridControl1.Model.ColStyles[i].Borders.Left = new GridBorder(GridBorderStyle.Solid, Color.Blue, GridBorderWeight.Thin);
}
for (int i = 1; i <= this.gridControl1.RowCount; i++)
this.gridControl1.Model.RowStyles[i].Borders.Top = new GridBorder(GridBorderStyle.Solid, Color.Red, GridBorderWeight.Thin);
this.gridControl1.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(gridControl1_PrepareViewStyleInfo);
}
private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if(e.RowIndex == 0 && e.ColIndex > 0)
{
e.Style.Borders.Left = new GridBorder(GridBorderStyle.Solid, Color.Blue, GridBorderWeight.Thin);
}
if (e.RowIndex > 0 && e.ColIndex == 0)
{
e.Style.Borders.Top = new GridBorder(GridBorderStyle.Solid, Color.Red, GridBorderWeight.Thin);
}
}
Please refer the following sample that illustrates the above.
http://websamples.syncfusion.com/samples/Grid.Windows/F73642/main.htmRegards,
Asem.