Hi,
I am trying to use igHierarchicalGrid with several levels.I understood one grid is generated for each level.Now, I need to iterate recursively through grid hierarchy to change options on each grid (ex : change "editMode" to "none").
I saw the following article : http://ko.infragistics.com/community/blogs/damyan_petev/archive/2012/10/26/igniteui-jquery-grid-unbound-columns-updating-and-hierarchy.aspx. (chapter "Setting values and child column layouts").I also had a look at this jsfiddle example : http://jsfiddle.net/damyanpetev/eMYCS/
But method provided is not working."$('#grid').data('igHierarchicalGrid').allChildrenWidgets()" always return empty array.
So, do you know a way to change options on each grid of a hierarchy ?
Thanks.
Alain.
Dear Cosoluce Stones,
You can found the answer at this post - http://ko.infragistics.com/community/forums/p/88016/440518.aspx#440518
Best Regards,
Stanimir Todorov
Hi Malav,
Do you have a solution for this ?
I now understand that allChildrenWidgets() is giving the list of all opened grids.But what I would like to do is to recursivelly loop inside the list and for each "node"/grid, I would like to know if it is a leave. So :
1 - if it is not a leave I should be able to expand or collapse the level
2 - if it is a leave I should be able to change grid options (ex : editMode)Examples I found allow to browse first level only.Do you have an example of code to achieve this two points ?Thanks for your help.Alain.
Hello Cosoluce_Stones,
I hope I answered your question. Please feel free to reach out to me if you have any follow up questions.
Thank you,
Malav
Thank you for contacting Infragistics with your question. I looked at the syntax you are using, and it seems correct. The reason you may be seeing an empty array is because the child grids may not have been expanded before you called this method. The IGHG's children grids are not created until their parent row is expanded. Hence, calling the method will return an empty array. I tried running this method in my sample code after expanding the parent rows and it returned proper results.
Please keep in mind that you will only be able to grab widgets of the current page that have been expanded. More importantly, if you need to apply something to a child grid, I suggest you do it in the childRowExpanded event
Please try the above approach and let me know if you still have concerns.
Sincerely,
Malav Patel