I'm working on a HTML5 and JavaScript website.
Is it possible to have a hidden column in Kendo UI Grid and access the value using JQuery?
I'm working on a HTML5 and JavaScript website.
Is it possible to have a hidden column in Kendo UI Grid and access the value using JQuery?
Using JavaScript
See the Kendo UI API reference.
Hide a column during grid definition
You can add
hidden: true
:Hide a column by css selector
Hide a column by column index
Hide a column by column name
Hide a column by column object reference
Using React
See the Kendo UI for React API reference
Hide a column during grid definition
You can set
show: false
:Using Angular
See the Kendo UI for Angular API reference
Hide a column during grid definition
You can add
[hidden]="true"
Programmatically hide a column
Using Vue
See the Kendo UI for Vue API reference
Hide a column during grid definition
You can add
:hidden="true"
Using ASP.NET MVC
See the Kendo MVC API reference
Hide a column during grid definition
Using PHP
See the Kendo UI for PHP API reference
Hide a column during grid definition
As @Nic says there are multiple ways of hiding a column but I'm gonna assume that you are using KendoUI methods for hiding it. I.e: set the column
hidden
to true or programmatically invokehideColumn
.If so, you should remember that you model might have fields that are not displayed or not even mapped in columns but they exist and you can still access them.
If we have the following Grid definition:
Where I've declared a column
Id
as hidden. I still can access the value ofId
by going to the model using:Runnable example