Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4040
Recursive loop through grid layouts hierarchy
posted

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. 

Parents
No Data
Reply
  • 290
    posted

    Hello Cosoluce_Stones,

     

    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

     

Children