Hi,
Is it possible to scroll igGrid to specific row by JavaScript ?
Thanks,
Ed
yes it is possible. I hope this snippet works for you:
$("#grid1_scroll").scrollTop($("#grid1").find("tr > td:contains('323')").first().position().top);
it will scroll to the row where the first TD text has "323" in it. Similarly, you can use other selectors. if you have primaryKey set in the grid, it is even more straightforward:
$("#grid1_scroll").scrollTop($("#grid1").find("tr[data-id='<primary key value>']").first().position().top);
We plan to add this to the grid API in the future. Hope it helps. Thanks,
Angel
Please advise how to keep both the horizontal and vertical scrollbars visible from anywhere in the grid. Right now, my vertical bar is appearing on the document (outside the grid) and the horizontal scrollbar is appearing from within the grid at the bottom. As a result, if I want to scroll to the right, I have to first scroll down to the bottom and then I can access the horizontal scrollbar.
Had you given table inside the div?
Sapna