How to set the cell properties for a range of cells
9 Dec 2019 / 1 minute to read
Use the GridControl’s ChangeCells method by passing it a GridRangeInfo object to change the appearance of a range of cells.
To set the BackColor and TextColor for a range of cells, use the below given code snippet.
//Style settings.
GridStyleInfo style = new GridStyleInfo();
style.TextColor = Color.Red;
style.BackColor = Color.LightBlue;
//Modifies a range of cells.
gridControl1.ChangeCells(GridRangeInfo.Cells(1, 1, 4, 5), style);
'Style settings.
Dim style As New GridStyleInfo()
style.TextColor = Color.Red
style.BackColor = Color.LightBlue
' Modifies a range of cells.
GridControl1.ChangeCells(GridRangeInfo.Cells(1, 1, 4, 5), style)
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page