How to make column hidden in jsGrid?

Since v1.3 jsGrid fields have an option visible

http://js-grid.com/docs/#fields

If you need to hide (or show) a field at runtime, it can be done like the following:

$("#grid").jsGrid("fieldOption", "ClientName", "visible", false);

Try this below code.

create a css class like below

.hide
{
   display:none;
}

And assign the css property to the field like below

fields: [
    { name: "Account", width: 150, align: "center" },
    { name: "Name", type: "text" },
    { name: "AccountID", css: "hide", width: 0}
]

Hope this will help you.


fields: [
{ name: "Account", width: 150, align: "center" },
{ name: "Name", type: "text" },
{ name: "AccountID", visible: false, width: 0}]