How we can change the background color based odd even rows in wijmo flexgrid

Posted by: rajesh.sakhamuri on 17 October 2019, 5:34 pm EST

  • Posted 17 October 2019, 5:34 pm EST

    How we can change the background color based odd even rows in wijmo flexgrid.
  • Replied 17 October 2019, 5:54 pm EST

    Hi Rajesh,

    You may simply use the alternatingRowStep property and set its value to 1. Now, you just need to apply some CSS rules on alternate rows:
    .wj-cell.wj-alt {
    background: cyan;
    }

    You may refer to the link below:

    https://stackblitz.com/edit/js-dssggb

    Regards,
    Ashwin
  • Replied 18 October 2019, 12:14 am EST

    Thank you Ashwin for giving the Reply. i have tried the above solution, even though it didn't work for me..Can you suggest any other solution.?
  • Marked as Answer

    Replied 20 October 2019, 2:19 pm EST

    Hi Rajesh,

    Could you please try adding the !important rule in the CSS:
    .wj-cell.wj-alt {
    background: cyan !important;
    }

    Also, please make sure that the value of alternatingRowStep is set to 1 in FlexGrid.

    If this does not solve the issue, could you please provide me a sample along with the version of the wijmo you are using?

    ~regards
  • Replied 21 October 2019, 4:58 pm EST

    Thank you Ashwin, it's working fine as expected.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels