Author Topic: editFirstCellInRow not working When scroll come  (Read 2065 times)

npdev13

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
editFirstCellInRow not working When scroll come
« on: July 05, 2019, 04:46:28 pm »
Hello,

I am facing strange issue while using editFirstCellInRow. This is the jsFiddle to represent the issue properly.

http://jsfiddle.net/npdev13/u1e8k2jL/12/

Here in this example when I click on "New Item" button it adding row and make the first cell in that row editable. initially there is not any item so no vertical scrollbar and at that time that editFirstCellInRow is working fine. But as soon as when I add 3rd item and scroll visible and now it stop working editFirstCellInRow functionality.

Can you please look at fiddle and give some solution about this issue?

Thanks,

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: editFirstCellInRow not working When scroll come
« Reply #1 on: July 05, 2019, 05:43:19 pm »
Since you are appending nodes, there is no need of insertIndx.

Code: [Select]
   grid.Tree().addNodes([newRow], parentNode);

And move setSelection inside the scrollRow callback.

Code: [Select]
grid.scrollRow({ rowIndx: ri }, function () {
grid.setSelection({rowIndx : ri, colIndx : 0});
        grid.editFirstCellInRow({ rowIndx: ri })
});

http://jsfiddle.net/vgsx0wht/

npdev13

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: editFirstCellInRow not working When scroll come
« Reply #2 on: July 05, 2019, 05:50:42 pm »
Thank you this works