To set the last row/column to be a special color (no matter where the last row/column is), you can use the PrepareViewStyleInfo event.
private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if(e.RowIndex == this.gridControl1.RowCount && e.ColIndex > 0)
{
e.Style.BackColor = Color.Red;
e.Style.CellType = "Static";
}
else if(e.ColIndex == this.gridControl1.ColCount && e.RowIndex > 0)
{
e.Style.BackColor = Color.Red;
e.Style.CellType = "Static";
}
}
The reason you are getting the gradient colors is because you are setting the CellType to "Header". The above code uses a Static celltype instead.