My question may be similar to,
and
Kendo Grid scroll to selected row
$("#button").click(function() {
$('html, body').animate({
scrollTop: $("#elementtoScrollToID").offset().top
}, 2000);
});
and I tried this also:
this.element.find(".k-grid-content").animate({
scrollTop: this.select().offset().top });
}
But, the solution provided to above questions did help me, I have a problem with the fiddle link provided by 2nd link: http://jsfiddle.net/blackjim/9GCYE/5/
The solution works fine when I try to get the view of the row which is somewhere down in the table of rows. But, after that, (ie, after getting focus of one of the row from the bottom of the grid), when I try to select some row from the top, the control still rolls down, and thus the purpose of scroll function goes meaningless there.
I have a search box, in which I can type something that matches with the row data, and if it matches, scroll should be triggered, so that I get my selected row to the users view.
The code, in the solutions above is fine for this criteria. But, now, again, if I try to search for something that matches with some row in the top of the grid, the scroll isn't happening from bottom (previously selected row) to the newly slected row at the Top of the grid.
How am I to modify the above code to work to my need?