我可以即时添加一个列到slickgrid吗? [英] Can I add a column to slickgrid on on the fly?

查看:256
本文介绍了我可以即时添加一个列到slickgrid吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在运行中向滑动网格添加全新的列.我试图制作一个用户可构建的矩阵,并要求他们能够在构建时添加列.

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.

推荐答案

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

例如

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

这篇关于我可以即时添加一个列到slickgrid吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆