I am trying to add Row to a grid which already has rows,using the following code
<a href="#" onclick="parentGrid.addRow((new Date()).valueOf(),['new row','text','text',1],0)">Add new row</a>
But it is adding at the end,Please tell me how i can add the row at the beginning.
Thanks in advance.
Unfortunately it’s not available to add the row to a treegrid at the first position.
I may suggest you to use the moveRowUp() method after adding the row to move it to the required position.
docs.dhtmlx.com/api__link__dhtml … rowup.html
I have the same issue. But I am using simply grid.
Is that possible to move row to the first position ?
My issue is :
MoveRowUp() and sortRows() throws type error on 2nd click. I have a popup and a grid is attached to it.In the grid I need to bring selected row ids to the top position. For that I have used MoveRowUp() and it worked perfectly. But later the remaining rows appeard not in order so I used sortRows() after that. Using this code move and sort work for the first time when pop up is loaded.
Note : Grid is client side filtering and loads only once
Unfortunately the problem cannot be reconstructed locally.
If the issue still occurs for you please, provide with a complete demo, it can be reconstructed.