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
55
Grouped IgGrid Expand All and CollapseAll functionality Notworking with Jquery version 1.12.4
posted

Hi,

I want use Expand all and Collapse all functionality for the IgGrid. Grid having Grouped Rows also.

I am using Jquerey version 1.12.4

I am referring below url code provide in the below forum thread

https://ko.infragistics.com/community/forums/f/ignite-ui-for-javascript/96348/collapse-expand-all-in-groupby#

Jsfiddle Url

http://jsfiddle.net/ig_mharrington/eah8npqh/

When i noticed in Jsfiddle it is only working with jquery version1.9.x

Please help me to fix the issue

  • 17590
    Offline posted

    Hello Prem,

    Many changes are introduced with new versions of both jQuery and Ignite UI libraries. Please keep in mind that before using a particular version of jQuery or Ignite UI we strongly recommend you verifying it is  supported in  our Supported Environments document, which is available here.

    In your scenario my suggestion, having in mind the performance of igGrid, is changing the value of initialExpand option of the GroupBy feature and rebinding afterwards. This approach will re-render the grid only once and will expand/collapse all records since the approach with clicking on all expand/collapse icons will re-render the grid many times - one for every click. For example:

    			$("#btnCollapse").click(function(){
    				$("#grid").igGridGroupBy("option", "initialExpand", false);
    				$("#grid").igGrid("dataBind");
    			});
    			
    			$("#btnExpand").click(function(){
    				$("#grid").igGridGroupBy("option", "initialExpand", true);
    				$("#grid").igGrid("dataBind");
    			});

    Attached will find the modified jsFiddle sample for your reference.

    Please test it on your side and let me know if you need any further assistance with this matter.

    6622.igGridExpandCollapseAll.zip