Kendo Grid scroll to selected row

后端 未结 5 1692
星月不相逢
星月不相逢 2020-12-31 15:19

I want to be able to call a function that scrolls the Kendo grid to the selected row. I´ve already tried some methods but none of them worked,

for instance

5条回答
  •  礼貌的吻别
    2020-12-31 15:53

    I had problems with the offset so position works better for me:

    grid.element.find(".k-grid-content").animate({  // use $('html, body') if you want to scroll the body and not the k-grid-content div
                        scrollTop: this.select().position().top  //  scroll to the selected row given by 'this.select()'
                     }, 400);    
    

提交回复
热议问题