Something so simply yet Telerik seems so un-intuitive.
I want a buttonface background color, but the cells I want white. It seems when I set the background color, it then colors the cells also. That to me seems very un-intuitive. Putting my gripe aside, any idea how to achieve this simply issue?
4 Answers, 1 is accepted
0
Hi John,
By default, the cells' background is not painted. What you need to do is use the CellFormatting event and set the back color of the cells as well. An example of this is available here: Formatting Cells.
I hope this will be useful. Let me know if you have additional questions.
Regards,
Dimitar
Progress Telerik
By default, the cells' background is not painted. What you need to do is use the CellFormatting event and set the back color of the cells as well. An example of this is available here: Formatting Cells.
I hope this will be useful. Let me know if you have additional questions.
Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
John
Top achievements
Rank 1
answered on 20 Dec 2017, 03:49 PM
Hi Dimitar,
Still doesn't work, I tried every example your link had and to no avail. What your example did was colorize the cell only if I clicked in it. That is not what I described in my question.
0
John
Top achievements
Rank 1
answered on 20 Dec 2017, 06:21 PM
I got it working, I had to also finagle with the gradient to fill
0
Hello John,
Here is an example of all needed properties:
Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Progress Telerik
Here is an example of all needed properties:
private
void
RadGridView1_CellFormatting(
object
sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
e.CellElement.DrawFill =
true
;
e.CellElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
e.CellElement.BackColor = Color.Aqua;
}
Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.