This is a migrated thread and some comments may be shown as answers.

GroupCollapsed event

2 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matjaz
Top achievements
Rank 1
Matjaz asked on 22 Jul 2014, 05:33 AM
In grid documentation I found collapseGroup and expandGroup method.
I need some custom action when user collapse or expand group. In documentation I found detailCollapse and detailExpand event, but not groupCollapse and groupExpand.
Is there any way to catch this 2 events?

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 23 Jul 2014, 10:32 AM
Hi Matjaz,


Indeed groupExpand and groupCollapse events are currently not available in the Kendo UI Grid API. As a custom solution you could bind to the mousedown event of the expand/collapse arrow in order to detect it manually.
E.g.
$("#grid").on("mousedown", "tr.k-grouping-row a:first", function () {
    if ($(this).hasClass("k-i-expand")) {
        console.log("expanding");
    } else {
        console.log("collapsing");
    }
});


Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Matjaz
Top achievements
Rank 1
answered on 23 Jul 2014, 12:16 PM
Thanks.
Tags
Grid
Asked by
Matjaz
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Matjaz
Top achievements
Rank 1
Share this question
or