Error when paste data to new cell in gridview in winjmo

Posted by: vinh.tongba on 8 November 2018, 12:34 pm EST

    • Post Options:
    • Link

    Posted 8 November 2018, 12:34 pm EST

    I have a grid view which has limited cell is 50.

    when i insert a new cell by command grid.rows.insert(idx, row) with idx = 0;

    that mean i want insert a new cell to top of the grid.

    The new grid i have still have only 50 cell.

    After that. i copy a content like

    1

    2

    3



    50

    and move the mouse to the new row and press Ctrl + V to paste

    After that i meet the issue

    1. The first row is empty and can’t paste the data
    2. The Grid length is not 50 anymore. it come to 51 cell. And i have two cell have content is 50 ( cell number 50 and 51).
    3. After a while ( by using scroll to scroll up and down ) the row number 51 is dissapper.

      Please tell me what happend and what i should do in this case
  • Posted 9 November 2018, 2:36 am EST

    grid.row.insert() method works well with unbound grids but for bound grids, we need to push new dataItem on the grid’s collectionView to insert a new row.

    Please refer to the following code snippet:

    grid.collectionView.sourceCollection.splice(0, 0, {});
      grid.collectionView.refresh();
    

    You may also refer to the following sample: https://stackblitz.com/edit/js-cbnmkp?file=index.js

    Please let us know if the solution doesn’t work for you.

    ~Sharad

Need extra support?

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

Learn More

Forum Channels