Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Adding a css class to row based on condition; GridModel approach
posted

Straight forward question. Do I have to use the column template? I'd much rather just add the class to the tr row. Class will be added based on data from a column in the row. I few things about my grid; I'm using GridModel approach with Remote Paging.
Thanks[URL="https://www.infragistics.com/community/forums/f/ignite-ui-for-javascript/p/addpost"].[/URL]

  • 485
    Offline posted

    Hello mr lee,

     

    Thank you for posting in our forum.

     

    As it greatly depends on your scenario, some additional details would be very appreciated:

     

    • Do you want to change the CSS for an entire row or just a specific cell in that row, based on the data in a given column?
    • Do you add the CSS styles with JavaScript after the grid has been initialized? Doing so might result in the style changes being lost after the grid rebinds – for example if you change to the next page and then return back to the first one, or perform Filtering.
    • Do you modify the CSS by handling some specific events for this purpose, or simply override it for the whole page during the initial page load?
    • What data does this column contain and what checks do you perform when modifying the styles?

     

     

    If you need any additional assistance, feel free to contact me.