SlickGrid icon indicating copy to clipboard operation
SlickGrid copied to clipboard

Tree item with children

Open RodolfoMota opened this issue 6 years ago • 3 comments

Its possible create an item with children? I was looking the examples and I didn't see anything like that.

RodolfoMota avatar May 02 '18 11:05 RodolfoMota

Is this any good: http://6pac.github.io/SlickGrid/examples/example5-collapsing.html ?

6pac avatar May 02 '18 12:05 6pac

I saw that, but can I insert an item with children? I have an item where I have a field with quantity like 3, and I need to create 3 children to add a serial number or something like that.

RodolfoMota avatar May 02 '18 13:05 RodolfoMota

I believe so. The essential element of this example is:

d["id"] = "id_" + i;
d["indent"] = indent;
d["parent"] = parent;

If you insert items with the appropriate parent into the data. Refresh the grid, and you'll get child elements. You'll have to do a little bit of work to get all this operating smoothly. See the SlickGrid Manifesto

6pac avatar May 03 '18 00:05 6pac