I did the same thing as guided in Knowledge Base Q10051 "How do I set the text that appears in a cell?". Unfortunately, it doesn''t work. Please help!
Below is the guidline from Knowledge Base
Q10051 - Info: How do I set the text color that appears in a cell
You use the TextColor property of the cell’s style, setting it to Color value.
In C#, use
gridControl1[rowIndex, colIndex].TextColor = Color.Red;
In VB, use
gridControl1(rowIndex, colIndex).TextColor = Color.Red
ADAdministrator Syncfusion Team November 23, 2004 05:47 AM
Are you using a GridControl or a GridDataBoundGrid? The code you posted should work for a GridControl (as long as it is not being used in a virtual manner), but will not work for a GridDataBoundGrid. See this KB. http://22.214.171.124/Support/article.aspx?id=560
Now if you are using a non-virtual GridControl, and the code does not work, has the cell been set ReadOnly is some manner? If you are trying to change the color of a readonly cell, first set grid.IgnoreRadOnly = true;, change teh styles, and then set the IgnoreRadOnly back to false.
If you can post a sample project showing the code not working, we can probably resolve this issue quickly.
DBDavid BosakNovember 23, 2004 06:16 PM
I am using the GridDataBoundGrid.Your support is adequate. Now it works very well.
Thanks a lot Clay Burch.
ARArindamJune 7, 2006 06:56 PM
What if I am using a GridGroupingControl which is bound to a dataset with 4 different datatables?
How do i changed the backcolor of the ce;; if the value in the cell on one of those tables is above or below a certain value?
I am running a for loop that iterates through each cell in the each of the 4 datatables and I would like to change the backcolor in the grid cell if certain cell value is above or below x.
ADAdministrator Syncfusion Team June 7, 2006 10:34 PM
The gridGroupingControl1.QueryCellStyleInfo event can be handled and there the cell value can be checked and the back color can be applied. Sample attached.