Two EmptyRows: Data was loaded after grid creatation


#1

autoEmptyRow was enabled during the grid creation, but data was not loaded in this period.
The data was loaded after the grid creation using mygrid.data.load(…).
But two empty rows, the first row and the last row, appear. I don’t need the first row.
How can I solve this?
Thanks


#2

I can solve this by setting the autoEmptyRow false during grid creation (autoEmptyRow: false), and change it to be true (mygrid.config.autoEmptyRow=true) after loading the data.


#3

Unfortunaetly the porblem cannot be reconstructed locally.
The following snippet works well for me locally:
https://snippet.dhtmlx.com/osl4lcg1
If the problem still occurs for you could you please, priovide a complete demo or a demo link, where the problem could be reconstructed.


#4

I think, you load the local data synchronously, while I load the external data asynchronously.
Thanks


#5

I’ve tried to simulate it with the timeout for the data parsing.
If the porblem still occurs for you could you please, provide a complete demo, where the problem can be reproduced locally.


#6

I’m experiencing the same behaviour when loading data from a URL after grid creation.
I solved it by calling grid.data.removeAll() immediately before grid.data.load().


#7

The porblem is confirmed. We’ll try to solve it in the future updates.
As a workaround you may try to enable the porperty after the initial data loading:
https://snippet.dhtmlx.com/hsc2l11s