Reputation: 3401
I have following column list.
columns: [{ "title": "A1", align: 'Left', "field": "A1", attributes: { style: "text-align:left" } },
{ "title": "A2", align: 'Right', "field": "A2", attributes: { style: "text-align:right" }, columnTemplate: function (cell, item) { return shield.format("{0:c}", +item.A2); } },
{ "title": "A3", align: 'Left', "field": "A3", attributes: { style: "text-align:left" }, format: '{0:MM/dd/yyyy}' },
{ "title": "UniqueSrl", "field": "UniqueSrl" }]
In above string I want to hide "UniqueSrl" column when generating above string i.e at runtime so that it will not display on grid.So please let me know is their any property set to particular column while generating string.
Upvotes: 1
Views: 59
Reputation: 1949
You can set visible: false
for your column definition and have it hidden on Grid initialization.
Alternatively, you can toggle its visibility at runtime using the hideColumn and showColumn methods.
Upvotes: 1