Hi,
I'm working with igHierarchicalGrid in JavaScript, where I have to get ID from row of parent grid while selecting child grid row. So in parent grid rowSelectionchanging event I'm getting my ID value, which is fine only when I expand one row in parent grid at one time but if I expand another row(s) at same time and my _row value multiple by 2 every time. Suppose if I expand 3rd row of parent grid and get _row = 6. Below is the piece of my code.
rowSelectionChanging: function (evt, ui) {
function
(evt, ui) {
var _row = ui.row.index;
var dataview = $("#Grid").data("igGrid").dataSource.dataView();
ID = dataview[_row]["ID"];
}
Please advise any help.
Thanks
Hi Booby,
Thanks for your reply.
I have downloaded the latest release version 12.2.20122.2086 today and used your code from attached files to produce event log. But again I'm not getting the right Row ID when expanding rows. I have hierarchical grid with two child grids under each row.
Below is the text from event log
=========rowSelectionChangING=========ID of the owner grid: GridTableui.row.index: 6=========rowSelectionChangING=========ID of the owner grid: GridTableui.row.index: 4=========rowSelectionChangING=========ID of the owner grid: GridTableui.row.index: 2=========rowSelectionChangING=========ID of the owner grid: GridTableui.row.index: 0
Regards,
Jasdeep
Hello Jasdeep,
I am just following up to see if you need any further assistance with this matter.
Hi Jasdeep,I haven't seen such a problem in a very long while and as Bhadresh mentioned, we cannot reproduce it right now.I'm attaching a much simpler HTML page with the igHierarchicalGrid and an event log next to it.Please try it out and if you are able to reproduce the problem, please attach a screenshot of the event page (with the event log visible) so we can investigate.Generally speaking, the only way the "problem" is reproducible right now is that if the developer would use ui.row.element[0]. rowIndex instead of ui.row.index.We have exposed the ui.row.index property on purpose because it takes into account special rows used by the hierarchical grid and any of its features.Looking forward to your reply.Cheers,Bobby
I am not certain on the cause of this behavior since I couldn’t reproduce this behavior at my end. Can you modify the sample I have provided on Mon, Dec 17 2012 9:13 AM that reproduces the behavior you described or share your own isolated sample that demonstrates the behavior you described?
I hope this helps.
Hi Bhadresh,
I have downloaded the latest service release and it still not working for me. If I only click on the row to fire rowSelectionChanging Event then getting correct rowID but again if I expand more than one row at same time then getting wrong rowID.