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

Use example for 'isDetailExpanded'

3 Answers 14 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ron
Top achievements
Rank 1
Iron
Ron asked on 03 Mar 2021, 04:15 PM

Does anyone have an example case for pulling isDetailExpanded into a component property?

In my current scenario I'd like to be able to modulate the open and close event with the row select and I'd like to feed that information into the method to then choose collapse or expand based on the boolean value - unless there's a more compact way to achieve the same result.

3 Answers, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 05 Mar 2021, 09:15 AM

Hi Ron,

Could I ask you for a bit more details. As far as I understand you would like to expand a row when it is selected and to collapse it when the row is deselected. Is that the case ? Thank you for clarifying.

Regards,
Svetlin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Ron
Top achievements
Rank 1
Iron
answered on 07 Mar 2021, 02:40 AM

Svetlin, 

Yes this is correct. I should also clarify that with the node packets I'm using [kendoGridExpandDetailsBy] and [(expandedDetailKeys)] aren't working so I'm looking to see if there's a different way in at the information I'm looking for.

0
Martin
Telerik team
answered on 09 Mar 2021, 03:42 PM

Hello Ron,

Using the kendoGridExpandDetailsBy directive with expandedDetailKeys collection is the right way to go in this case. Please ensure that the Grid package version is up to date:

https://www.telerik.com/kendo-angular-ui/components/installation/up-to-date/

Here is an example where the row is expanded when is selected. I used kendoGridSelectBy directive and bound the collection used for expandedDetailKeys  to the selectedKeys option, which stores the currently selected rows:

https://stackblitz.com/edit/angular-9ugd4j

I hope this helps.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Ron
Top achievements
Rank 1
Iron
Answers by
Svet
Telerik team
Ron
Top achievements
Rank 1
Iron
Martin
Telerik team
Share this question
or