Completed
Last Updated: 15 Jan 2020 12:14 by ADMIN
Release R1 2020
Werner
Created on: 11 Mar 2019 09:22
Category: Accordion
Type: Feature Request
17
Accordion: Provide the option to collapse all items
Currently in RadAccordion one accordion item is always expanded.  I would need the option the accordion to be fully collapsed. In addition, when the header of an expanded item is clicked, it should be collapsed.
6 comments
ADMIN
Yana
Posted on: 12 Nov 2019 08:29

Hello Hermann,

Thank you for posting your feedback about the feature request, we'll definitely consider it.

Regards,
Yana
Progress Telerik

Andreas
Posted on: 11 Nov 2019 16:10

Bump,

Would need this as well.
I would actually expand on this and have an enum, somethin like:
ExpandMode => ZeroOrOne, One, ZeroOrMore, OneOrMore
Which would mean:
ZeroOrOne = You can collapse all but can expand only one

One = There is always exactly one expanded

ZeroOrMore => You can collapse/expand any number of items at once

OneOrMore => There is always at least one item expanded, but you can also expand more at the same time.

ADMIN
Yana
Posted on: 27 Mar 2019 07:03
Hello guys,

Thank you for your input on this feature request regarding Accordion control. We're having it in mind and as soon as we schedule it, its status will be updated.

Regards,
Yana
Progress Telerik
Joe
Posted on: 27 Mar 2019 06:15

Thank you Werner;

 

That is helpful.  I see the request is 'Approved' so I assume this will get fixed sooner rather than later with it being so simple.

 

Joe

Werner
Posted on: 26 Mar 2019 21:49

Hi Joe, I'm currently using a workaround by handling the tap event on the label in the header template

           <radPrimitives:AccordionItem x:Name="AccordionItemTop10" IsExpanded="False">
                <radPrimitives:AccordionItem.Header>
                    <radPrimitives:AccordionItemHeader>
                        <Label Text="{x:Static geaProps:Resources.RankingHighscores}" Style="{StaticResource ItemHeaderLabel}">
                            <Label.GestureRecognizers>
                                <TapGestureRecognizer Tapped="OnHeaderTapped" CommandParameter="{x:Reference Name=AccordionItemTop10}" />
                            </Label.GestureRecognizers>
                        </Label>
                    </radPrimitives:AccordionItemHeader>
 

private void OnHeaderTapped(object sender, EventArgs e)
        {
            var parameter = (e as TappedEventArgs)?.Parameter;

            if (parameter is AccordionItem accordionItem)
                accordionItem.IsExpanded = !accordionItem.IsExpanded;
        }

So I can collapse the currently open item so that all items are collapsed.

@Telerik: Think, it would be trivial to provide this behavior by an option out of the box ;-) One disadvantage of the workaround is that it does not react on taps onto the arrow.

Joe
Posted on: 26 Mar 2019 20:41
This is exactly what we need also.