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
Thanks for the feedback. it looks like a bug , from what you are describing. i will ask someone on the team to verify it and log an issue if it turns out to be one.
Hope it helps
Angel
Hello,
I was able to get the correct value in the rowSelectionChanging event while expanding rows. I have attached the sample for you to review. The sample uses latest service release of IgniteUI. This sample is created using our CDN references as shown on the below link:
<https://www.igniteui.com/help/deployment-guide-infragistics-content-delivery-network(cdn)>
Run the sample and test. Expand any row and it will show value in “ProjectId” column of that row.
If this sample does not demonstrates the functionality you described, feel free to modify it and send it back that demonstrates the behavior you mentioned with relevant dependencies so I may look in to this.
I hope this helps.
Hi Bhadresh,
Thanks for your reply.
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.
Regards,
Jasdeep
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
Hi Booby,
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
Hello Jasdeep,
I have created a support ticket with ID CAS-110779-M2S4F4 on your behalf and linked it to Development Issue #133069 – “The ui.row.index parameter of the rowSelectionChanging/ed events is incorrect (takes into account expanded hierarchical grid row) when group-by is enabled”. You can view the status of the dev issue by going to Account > Support Activity on our website, selecting your case and clicking the Development Issues tab. When the issue is fixed, you will be automatically notified.
If you have any questions, please do not hesitate to ask.
Hi Jasdeep,Thanks a lot for the sample!I was busy with some other tasks so accept my apologies for the delay in my reply.Now, about the issue - I'd like to say that you've prepared a very nice sample (you'd be surprised at how rare this is :)).I created an HTML sample based of the TXT files you provided and I'm attaching it to my current reply.I'm also attaching a screenshot which shows what I'm seeing - that clicking on a child grid row (when at least 2 root grid rows are expanded) reports the correct row ID in the rowSelectionChanging event.Here's a list of the difference between you TXT files and my sample:
There is a bug (developer issue) caused by the fact that the GroupBy is enabled alongside with Selection - this is what's causing the incorrect row index in the rowSelectionChanging event.I'll take care of the bug next thing in the morning and my colleagues from the support team will provide you with the Customer Case ID of the issue so you can track it.
PS: Me and others like myself try to be diligent volunteers in the forum and assist our colleagues from the customer support dept., but since we've got our own tasks to handle first, forum activity may be slow from our side at times. Thus sending a support request remains the most reliable way of getting assistance.Thank you for understanding the matter.
Cheers,Borislav
Hi ,
Please advise any help of my issue from my last post.
Hi Bobby,
I'm still not getting correct row id during row selection. I have attached my sample files and using latest release.
Please take a look and advise if I'm doing something wrong?
Hi Jasdeep,I've modified my sample to match your current description
ecatenate said:I have hierarchical grid with two child grids under each row.