Event button in itemFormatter error

Posted by: somjet on 14 September 2017, 11:28 am EST

  • Posted 14 September 2017, 11:28 am EST

    http://jsfiddle.net/pfa4aL4r/

    1. scroll left right left right 3 times
    2. click button
    3. bug log show duplicate item
  • Posted 14 September 2017, 11:28 am EST

    Hello,

    I was able to replicate the issue at my end. I have escalated the issue to the concerned team. I will let you know as soon as I get any information in this regard.

    Thanks,

    Manpreet Kaur

  • Posted 18 January 2018, 6:23 pm EST

    Hi,

    Is there a fix for this issues? I am experiencing the same thing. I have the code below and when I click the details button, it logs “click event” as it should. But when I scroll up and down on the grid then click the button again. It logs the “click event” 20, 30 and even as much as 90 times depending on how many records are in the grid. Every time you scroll, it assigns multiple events to the button press.

    wijmoJobGrid.itemFormatter = function (panel, r, c, cell) {
        if (panel.cellType == wijmo.grid.CellType.Cell && panel.columns[c].header == "Detail") {
            cell.innerHTML = "<input style='background: #5C0201; color: #FFFFFF;' type='button' value='Details' id='elem'/>";
            $(cell).on('click', '#elem', function () {
                console.log('click event');
            });
        }
    };
    
Need extra support?

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

Learn More

Forum Channels