Wijmo itemformatter issue, highlighting a cell

Posted by: alvin.shih on 26 September 2017, 2:06 am EST

  • Posted 26 September 2017, 2:06 am EST

    Hi I'm trying to use the itemFormatter to highlight a cell,
    however it seems to be highlighting random cells when i scroll the grid left to right and vis-avis.
    I have attached an example where I wanted to highlight the first cell. If you try to scroll horizontally, you will see it randomly highlights other cells as well.
  • Replied 26 September 2017, 2:06 am EST

  • Marked as Answer

    Replied 27 September 2017, 1:01 am EST

    Hi Alvin,
    The grid recycles cells, so you have to reset the background if you change it.
    Please use the following code snippet to avoid that problem

    if (isCell) {
    var backColor="",
    if (r == 0 && c == 0) {
    backColor = '#ffecec';
    color = '#de0000';
    cell.style.backgroundColor = backColor;
    cell.style.borderBottomColor = color;

    Manish Kumar Gupta
  • Replied 27 September 2017, 11:17 pm EST

    Thanks the solves it.
Need extra support?

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

Learn More

Forum Channels