jquery - Move dataItem (row) to first place in Kendo grid -


i want able move specific row first place on first page in paginated kendo grid. have found dataitem via jquery not sure how append first element in grid. couldn´t find similar in documentation on how removerow. can perhaps me in moving dataitem firstplace?

here´s script i´ve found dataitem:

function onfetchitem(gridname) {     var ids = gridname.split("_");     var item = $("#itemsearch_" + ids[1]).val();     var grid = $("#" + gridname).data("kendogrid");     var data = grid.datasource.data();     var dataitem = $.grep(data, function (d) {         return d.item == item.touppercase();     });     //todo: move dataitem first record in grid } 

i found in thread use greb suggest above.

you first remove item , insert @ first index:

grid.datasource.remove(dataitem); grid.datasource.insert(0, dataitem); 

Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -