Initialize grid from a table that has display: none set.

0 Answers 329 Views
Grid
DuelingCats
Top achievements
Rank 2
DuelingCats asked on 15 Jan 2023, 11:17 PM

I am working on a page that has a table set to display: none and I want to have the Kendo UI Grid initialize its data set from this table. Unfortunately I am seeing that this does not work properly when the table has style=display: none as an attribute. In this situation I see the Grid's column headers render, but no rows are shown. Of course simply removing the display none style would fix the problem, but the table is several thousand rows and we have it hidden to increase page load performance.

Is there a way I can initialize the Kendo UI Grid from this hidden table, then show the grid afterwards?

DuelingCats
Top achievements
Rank 2
commented on 15 Jan 2023, 11:25 PM

Looks like I found my answer. For anyone looking, I had to do the following after the grid is initialized. gridElement is the Id of the table I am initializing from.

$("#gridElement").data("kendoGrid").table.show()

No answers yet. Maybe you can help?

Tags
Grid
Asked by
DuelingCats
Top achievements
Rank 2
Share this question
or