Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 358
Rich Standbrook Avatar asked Dec 16 '10 16:12

Rich Standbrook


1 Answers

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};
like image 134
Tin Avatar answered Sep 28 '22 07:09

Tin