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

collapseGroup function not work

2 Answers 177 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kiman
Top achievements
Rank 1
Kiman asked on 14 Dec 2017, 04:01 AM

Hi, my kendo version is 2017.3.1026, chrome version is  63.0.3239.84

I found that collapseGroup is not work ,

dojo example:https://dojo.telerik.com/Ehuru

you can see that only first row has been collapse....

but I want it collapse all rows, is this a bug?

2 Answers, 1 is accepted

Sort by
0
Accepted
Viktor Tachev
Telerik team
answered on 14 Dec 2017, 03:48 PM
Hello Kiman,

In order to collapse the groups you would need to iterate through them and call collapseGroup for each one. The jQuery each() method is suitable for this. Furthermore, I suggest adding the logic in the Grid dataBound event. This would ensure that the code is executed after the data has been retrieved. The modified example below illustrates the functionality.


Give the sample a try and let me know how it works for you.


Regards,
Viktor Tachev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Kiman
Top achievements
Rank 1
answered on 15 Dec 2017, 04:20 AM

Hi , thanks for reply, it works!

sorry I was looked API document but didn't notice that this function is work at "specified group",

so multi result selector only collapse first group, of course, ha ha...

Tags
Grid
Asked by
Kiman
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Kiman
Top achievements
Rank 1
Share this question
or