How to show/hide Expand/Collapse Button on individual Accordion Pages

Posted by: vijay on 2 February 2023, 3:46 pm EST

  • Posted 2 February 2023, 3:46 pm EST

    Hello,

    I can change the PageSettings.ShowExpandIcon setting for the C1Accordion control to show or hide the Expand Icon for all pages, but is it possible to adjust this setting for individual pages, so that some pages are expandable and some are not? Thank you.

    Vijay

  • Posted 2 February 2023, 9:36 pm EST

    Hi Vijay,

    Thank you for sharing the details. We have shared your requirement with the development team to get their insights on it. We will let you know as soon as we have an update.

    [Internal Tracking ID: C1WIN-29066]

    Best Regards,

    Kartik

  • Posted 5 February 2023, 3:10 pm EST

    Hi Vijay,

    As per the development team, hiding the expand/collapse icon for the individual pages is not currently possible. The development team has considered this as an enhancement request. We will let you know as soon as we have any updates on the same.

    Thanks, and Kind Regards,

    Kartik

  • Posted 2 August 2023, 8:08 pm EST

    Hi Vijay,

    We are glad to let you know that the ShowExpandIcon property has been added to the C1AccordionPage in the latest 2023v2(611) release. FYI, this property only allows showing/hiding the expand icon for specific pages and does not have an effect on the expand/collapse functionality of the pages.

    To stop a page from changing the expand-collapse state, you can handle the PageExpandStateChanging event of the C1Accordion.

    private void C1Accordion1_PageExpandStateChanging(object? sender, C1.Win.Accordion.PageExpandStateChangingEventArgs e)
    {
          if (e.Page.ShowExpandIcon == C1.Win.Accordion.IconsDisplayMode.HideAlways)
              e.Cancel = true;
    }

    To install the latest NuGet package, you can use the link below.

    (https://www.nuget.org/packages/C1.Win.Accordion/6.0.20232.611)

    Best Regards,

    Kartik

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels