grid.addRow is not a function


#1

Grid version 6.4.2

grid.uid() and grid addrow is function error

How use it?

helpㅠㅠ


#2

I’m not entirely sure about grid.uid(); that’s not a function I’ve ever used. But for grid.addrow(), now you need to use grid.data.add(). grid.data is the DataCollection for the grid component; check the DataCollection API for more information. It may have what you’re looking for with grid.uid() also.


#3

thank you. i found DataCollection API information so I solved problem.


#4

I want to add a row with blank cells at given index in a grid ? I tried using grid.data.add() but showing error Item already exist.


#5

Unfortunately the problem cannot be reconstructed locally.
You can check the folllowing example:
https://snippet.dhtmlx.com/mrtj6gve
If the porblem still occurs for you please, provide a complete demo or a demo link, where the problem can be reproduced.


Add row from Form and update Grid with new row selected
#6

can we delete any element from dataset after grid initialization ?I want to delete selected row from grid.


#7

please, try to use the remove() method of the dataCollection:

grid.data.remove(id)

https://docs.dhtmlx.com/suite/data_collection__api__remove.html