Our blazing fast Grid component built with pure JavaScript


Post by web combatant »

I want to insert the child row in the tree grid
https://prnt.sc/a-75ZkkcpepJ

grid.store.insert(0, newData)[0];

using above code
But this code work only for the parent row
How can I implement this function?


Post by tasnim »

Hi,
You just need to set the parentId of the record to another parent's id.
You can test it here https://bryntum.com/examples/grid/basic/
like this

Attachments
chrome_ZH7CVNQwo9.gif
chrome_ZH7CVNQwo9.gif (665.81 KiB) Viewed 431 times

Post by web combatant »

I need to add a new child row
not change the parentId of the existing child row

How can I add a new child row by using the insert function or another?


Post by web combatant »

https://prnt.sc/a8XFbVMHZP0Y
Or can u add an "add function" on cellMenu?


Post by mats »

Yes, easy to add menu items. Please see docs: https://bryntum.com/docs/grid/guide/Grid/customization/contextmenu

Does that help?


Post by web combatant »

Yeah, sure
But there is no exist add function.
I need "add function" on cellMenu.

Now, how can I add a new child row on tree grid?
https://www.loom.com/share/0525410ac82e4f0da9a37f31c09ff215


Post by marcio »

Hey web combatant,

Perhaps you're looking for the insertChild function?? https://www.bryntum.com/docs/grid/api/Core/data/mixin/TreeNode#function-insertChild

Best regards,
Márcio


Post by web combatant »

Great
Thank you


Post Reply