开发者

SlickGrid enableAddRow

I want to use the enable AddRow option but I want the new row to be displayed at the top of the grird...Any开发者_如何学运维 suggestions; Beloiw is the doco in slickgrid.js.

enableAddRow - (default false) If true, a blank row will be displayed at the bottom - typing values in that row will add a new one.

Thank you!


function addRowToTheTop(){
    grid.getData().splice(0, 0, {});
    grid.invalidateAllRows();
    grid.updateRowCount();
    grid.render();
}

Call this function to add an empty row at the top of the grid. Not very effective but it works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜