jQuery UI Widgets › Forums › TreeGrid › jqxTreeGrid Add Insert Row at Parent Row
This topic contains 6 replies, has 2 voices, and was last updated by Dimitar 10 years, 2 months ago.
-
Author
-
Hello
Can someone you please show me how to add/insert a new row, between selected row (b) and its parent (a).
Situation before
- [-] x
- [-] a
- [-] b <========= selected item / rowKey
- [-] c
- [-] b <========= selected item / rowKey
- [-] a
Situation after
- [-] x
- [-] a
- [-] b
- [-] Go jqWidgets! <============ this is the added/inserted row
- [-] c
- [-] Go jqWidgets! <============ this is the added/inserted row
- [-] b
- [-] a
var rowKey = null; $("#jqxTreeGrid").on('rowSelect', function (event) { var args = event.args; rowKey = args.key; }); $("#treeGrid").jqxTreeGrid('addRow', null, { "name": "Go jqWidgets!" }, 'first', rowKey);
Thank you.
I made a mistake in the Situation after. Here is the correct situation.
- [-] x
- [-] a
- [-] Go jqWidgets! <============ this is the added/inserted row
- [-] b
- [-] c
- [-] b
- [-] Go jqWidgets! <============ this is the added/inserted row
- [-] a
Hello jqwidgetsdev,
New rows in jqxTreeGrid can be added as child rows of a given row (specified by the last parameter of addRow), but not as parent rows, as is your requirement as far as I understand.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hello Dimitar.
Thank you for getting back to me for clarification of my requirement.
No, new rows in jqxTreeGrid need to be added as
parent
(not child) of a given row.In my example row
B
is selected and a new rowGo jqWidgets!
is added as parent of rowB
.
Then existing rowB
becomes a child of the new rowGo jqWidgets!
being added.Does this make sense?
Thank you for guidance.
Hi jqwidgetsdev,
I understood you the first time, but, unfortunately, your requirement cannot be achieved. New rows can be added as children, not parents.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hello Dimitar.
Sorry, I thought it was a question for me.
May I please request this functionality be added to the next release of jqWidgets?
Thank you.
Hi jqwidgetsdev,
Unfortunately, we do not plan on introducing this feature to jqxTreeGrid.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ - [-] x
-
AuthorPosts
You must be logged in to reply to this topic.