I would like to know if it is possible to set the style properties of a cell in the grid_InitializeRow event
I can do the
e.Row.Items.FindItemByKey("keyfield")
but once I have the item/cell. How can I access and set some properties?
readOnly
background-color
font type, etc..
I would rather not have to use a template field.
Thanks
Is there any response on this? Please?
we have a license for 2012.2
Hello Daryl,
It's been a while since your last query. But in case you still need assistance, I will be glad to help you.
If you want to set some styles to the grid cells, on InitializeRow you may access the respective item by its key and set it a CssClass property, for instance:
e.Row.Items.FindItemByKey("ID").CssClass = "cellCss"
This will create a css class which will be applied to every single cell corresponding to this key and then you may set different styles through this class. For instance:
<style type="text/css">
.cellCss
{
background-color:Teal !important;
}
</style>
Attached is also a sample for your reference.
Please let me know if you have any further questions.
Sincerely,
Tsanna
Hello Daryl007,
If you need any further assistance regarding this matter, do not hesitate to contact me.
Thanks!!!!