I have started working with koGrid. And I want to hide a special column 'id' in koGrid.How can i do that?
gridOptions : {
displaySelectionCheckbox: false,
data: items,
multiSelect: false,
enableColumnResize: true,
columnDefs: [
{ field: 'id', displayName: 'id' },
{ field: 'name', displayName: 'Name' }
]
}
There is a
visible
option on thecolumnDefs
what you can set tofalse
:Or if you don't need the
id
value anywhere (so you're not using in template, or filtering sorting, etc.) you can just leave out the whole{ field: 'id', displayName: 'id' }
.