开发者

Can I add a column to slickgrid on on the fly?

开发者 https://www.devze.com 2023-01-31 03:53 出处:网络
Is it possible to add an entierly ne开发者_Go百科w column to a slickgrid on the fly. I am trying to make a user buildable matrix and need them to be able to add columns as they build.var columns = gri

Is it possible to add an entierly ne开发者_Go百科w column to a slickgrid on the fly. I am trying to make a user buildable matrix and need them to be able to add columns as they build.


var columns = grid.getColumns();
columns.push( columnDefinition );
grid.setColumns(columns);

With for instance

var columnDefinition = {id: "column1", name: "title", field: "column1", editor: Slick.Editors.Text};
0

精彩评论

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