Hello,
I am trying to set up a timer that will flash certain index rows in UltraWebGrid component.
Unfortunately, once that I have my row object in javascript I cannot change any style... it seems like my changes are hidden or encapsulated by a major style somehow.
I have tried to change the FontFamily and backgroundColor using row.Element.style.XXXXX = YYYY; , but this does not seems to work.
Please, how I can I change a row/cell style in client using javascript?
Thank you very much for the support!
Regards,
Hi,
The row.Element is accessible in JavaScript. I used both the cellId and the rowId to get the Row object. Here is my code snippet:
{
row.Element.style.backgroundColor = "Red";
}
function UltraWebGrid1_CellClickHandler(gridName, cellId, button)
row.Element.style.backgroundColor = "Brown";
row.Element.style.color = "Blue";
In the AfterRowActivateEvent Handler, the rowId is a parameter while in CellClickHandler the cellId is a parameter. Both of them work.
I hope this helps.
Thanks
Can I assume this doesn't work if you use the LoadLayout feature of the data grid? I've tried the exact syntax above, also row.Element.className = 'highlightRow' (where highlightRow is a class in the style sheet). It doesn't seem to work. I've used the "alert" feature of javascript to make sure my row is an object, and that the className property was set. Both appear to be correct, but nothing happened to the grid row. Any other suggestions or ideas? Thanks!
Thanks for your quick response!
I will try to set the style again. I will let you know my results. I have tried to set the row style with no luck. Maybe there is a setting I am forgetting...
Anyway, the cells response to my styling, so I will use cells to flash in some way.