Hello, I scroll the scroll bar to the row I click on the grid. My problem is that it only works downwards, when I click on a row from above, the bar does not move upwards.
$("#jqxgrid").on('click', function (event) {
var index = $("#jqxgrid").jqxGrid('getselectedrowindex');
$("#jqxgrid").jqxGrid('selectrow', index);
$("#jqxgrid").jqxGrid('focus');
$("#jqxgrid").jqxGrid('ensurerowvisible', index);
});
but when I run the “ensurerowvisible” command from the console it moves up or down. Why doesn’t it work when I click on it in the grid? When not running Returns false
$("#jqxgrid").jqxGrid('ensurerowvisible', 2);
or
$("#jqxgrid").jqxGrid('ensurerowvisible', 30);
I prepared sample code for you, but it is very strange, although it is the same code, the scroll bar does not move up or down. It works only through the console.but this code works in my project only if I click downwards
https://jsfiddle.net/Anatolium/8oqe5myx/27/
$("#jqxgrid").jqxGrid('ensurerowvisible', 2);
or
$("#jqxgrid").jqxGrid('ensurerowvisible', 30);
thank you