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

时光怂恿深爱的人放手 提交于 2019-12-05 13:18:01

问题


Is it possible to add an entierly new 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.


回答1:


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};


来源:https://stackoverflow.com/questions/4463176/can-i-add-a-column-to-slickgrid-on-on-the-fly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!