Hello,
I have an igHierachicalGrid which have one child grid.
On the first display of the grid, everything is fine.
I want to append some rows to the grid but only the parent values is getting displayed.
How can I proceed to append both the parent and child values?
I am using the follow to add new row to my grid
- $("#myGrid").igGridUpdating("addRow", row);
Thanks in advance.
Ainjaka
Hello Ainjaka,
Thank you for posting in the Infragistics community!
We received your support request concering the igHierarchicalGrid, and this case has been assigned to me. Infragistics is dedicated to helping you solve this issue. Our team and I have done an initial review of your case and I am going to try and reproduce your issue. However, I am not perfectly clear on the behavior you're describing. If you could please provide a picture, video, or code sample that would give me a better idea of the behavior you are seeing, it would be a great starting point that will help me to resolve this case faster. Once I have an idea of the issue you are having, I can do the proper research to get everything sorted out for you.
I hope to hear back from you soon. Please let me know if there is anything else I can help you with.
Hello Joe,
thanks for your response.
Please find attached 2 screenshots that describe my issue:
- Capture-1 is the grid which is displayed when the first time (when I instantiate my igHierarchicalGrid)
- Capture-2 shows 3 more rows that was added with the method "addRow" of igGrid
As you see, the 3 last rows don't have the "+" button on which we can expand the child grid.
The datasource which is used is an array like below:
[{ "idtr": "000000001362", "nat": "PBW", "typ": "PRO", "dtr": "DEMANDE 10Activité 10C", "Projet": { "mois1": "1000000.0", "mois2": "1000000.0", "mois3": "1000000.0", "mois4": "1000000.0", "mois5": "1000000.0", "mois6": "1000000.0", "mois7": "1000000.0", "mois8": "1000000.0", "mois9": "1000000.0", "mois10": "1000000.0", "mois11": "1000000.0", "mois12": "1000000.0" } }, { "idtr": "000000001363", "nat": "PBW", "typ": "PRO", "dtr": "DEMANDE 10Activité 10C", "Projet": { "mois1": "0.0", "mois2": "0.0", "mois3": "0.0", "mois4": "0.0", "mois5": "0.0", "mois6": "0.0", "mois7": "0.0", "mois8": "0.0", "mois9": "0.0", "mois10": "0.0", "mois11": "0.0", "mois12": "0.0" } }]
The child grid's datasource is the node "Projets".
Feel free for any other question.
Thanks in advance for your help
Regards,
Although I am still investigating your issue, I was hoping you might be able to try something and let me know if it works for you. As an option for your igHierarchicalGrid, please attempt to set the initialDataBindDepth option to 1. This will give you the row expander, however, may cause issues if there is no data defined for the child. I am looking further into a fix such that you can automatically edit the data for the child if none already exists. Please let me know how this works in your sample.
Please do not hesitate if you have any other questions.
Hi Joe,
I had already tried to set the initialDataBindDepth option to 1 but it did not resolved the issue.
I will try to create a little sample from my real development and post it here.
Hope that we will find a solution very soon as my client really need it urgently :)
Thanks for your support and regards,
I have found a solution to the issue you were having. To allow the behavior you were looking for, we must set the initialDataBindDepth option to 1, and the autoCommit option to true. The issue you were encountering was related to the grid's parent row not being committed which resulted in strange behavior when trying to view the child grid. Please run my attached sample and let me know if this gives you the desired behavior.
Please do not hesitate to contact me for further assistance.
Thank you very much for your help concerning this issue. Your sample really helped me to better understand the igHierarchicalGrid component.
However, my client asked me if it is possible to hide the "+" on which we can expand the child grid if the row does not contain any child.
I implemented the solution suggested by this forum http://es.infragistics.com/community/forums/t/80284.aspx.
It disables only the expanding functionality but do not hide the "+". No problem, it's fine for me :)
thanks again and regards,
I am very glad I was able to help you understand the igHierarchicalGrid component, and that you were able to achieve the desired behavior. Please do not hesitate to contact me if I can be of further assistance to you.
Is there anything else I can assist you with on the matter? Please do not hesitate to contact me.