Version ignite-ui-full: 18.2.99
My project have problem with IgGrid. I need update data source object manual without API and used property "rowVirtualization=true".When data source large current height grid, scrollbar appearIf I scroll to bottom and update data source by $("#grid").igGrid(dataSourceObject", data).igGrid("dataBind"), the grid auto scroll to top
I want to keep position of scrollbar. Please help me
Hello Quoc,
Thank you for posting in Infragistics Forum.
You should be able to restore the scroll position by saving the current scroll position and resetting it using igGrid’s virtualScrollTo() method like this:
-----------------//Save the current scroll positionvar verticalContainer = $("#grid_scrollContainer");var topPos = verticalContainer.scrollTop();
//Call dataBind() $("#grid").igGrid("dataSourceObject", data).igGrid("dataBind"); setTimeout(function(){ //Reset the scroll position $("#grid").igGrid("virtualScrollTo", topPos + "px"); }, 0);-----------------
https://www.igniteui.com/help/api/2018.2/ui.iggrid#methods:virtualScrollTo
Please let me know if I may be of further assistance.
Thanks for you answer. The solution have trouble in IE browser. The user see grid scroll to top and after that scroll to bottom. IE is main browser of us. Can you help me fix that in IE?