Author Topic: I want to auto increment the id when adding with treemodel  (Read 1733 times)

ohbayashi

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 41
    • View Profile
I want to auto increment the id when adding with treemodel
« on: April 10, 2018, 05:35:03 pm »
When adding a line with tree () of treemodel, I want to use addNodes, but unlike the addRow method, a set of id is necessary.

I want to register even without an id, but is there any way?

document sample.
Code: [Select]
    tree.addNodes( [
        { id: 100, name: "abc", ... },
        ...
    ], tree.getNode(1) );


wanting.
Code: [Select]
    tree.addNodes( [
        { name: "abc", ... },
        ...
    ], tree.getNode(1) );

Or you can add it to node with addRow.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: I want to auto increment the id when adding with treemodel
« Reply #1 on: April 10, 2018, 09:57:50 pm »
There is no known way to avoid passing id while adding nodes in a treegrid.