Hi everybody! Somehow I couldn't find the answer for this question in any documentation, hope you can help.
I have a Hierarchical Grid with two bands, let's assume it looks like this:
ROW A
-- child row A0
ROW B
-- child row B1
-- child row B2
-- child row B3
-- child row B4
ROW C
-- child row C5
-- child row C6
Inside iggridupdatingeditrowstarted event I want to programmatically start edit mode of a certain cell in a certain child row
The following command only allows me to bring parent row into edit mode:
$("myGrid").igGridUpdating("startEdit", 1, 0); // this would bring cell 0 of ROW A into edit mode
How can I bring child row C5 into edit mode? I have the index "5" but $("myGrid").igGridUpdating("startEdit", 5, 0); does nothing.
Hello Natan Flayer,
Thank you for contacting us.
First of all I want to let you know that when the igHierarchialGrid is rendered for a first time, its children are not. They are missing from the DOM, this means that you will need to expand parent row in order to see its child/children, although this is not a recommended approach. About your question regarding "child row into edit mode" the jQuery selector is not correct, every child is presented as igGrid in the DOM, this means that you cannot access it through its parent id. You can get the child grid id with ui.owner.grid.id() from event args.
Code snippet:
editRowStarted: function (evt, ui) {
$("#" + ui.owner.grid.id()).igGridUpdating("startEdit", 1, 0);
},
Could I ask you what is your exact product version?
If I may be of further assistance please do not hesitate to contact me.
Hi, finally I was able to solve the problem this way;
var childGridId = "#mygrid_" + parentIDkey + "_" + childLayoutKey + "_child";
$(childGridId).igGridUpdating("startEdit", somerowindex, somecolindex);