Server side events

10 May 20172 minutes to read

Event Name Description Parameters
OnAccordionPaneClick Event is triggered when the accordion pane is clicked. (Object Sender, AccordionEventArgs e)Values passed in argument are as below,ActiveIndex - to get the activated pane indexEventType - returns the event name

The following steps explains you on how to define server side event for an Accordion control.

In an ASPX page, define the Accordion control and add the contents correspondingly.

  • HTML
  • <div style="width: 400px;">
        <ej:Accordion ID="BasicAccordion" runat="server" OnAccordionPaneClick="BasicAccordion_AccordionPaneClick">
                <ej:AccordionItem Text="Orubase">
                         Orubase is the only mobile application development Framework built especially for developing complex line-of-business mobile applications targeting iOS, Android, and Windows Phone platforms in the shortest possible time frame. 
                <ej:AccordionItem Text="WinRT XAML">
                        Essential Studio for WinRT contains all the controls you need to build line-of-business tablet applications including grid, chart, map, tree map, SSRS report viewer, rich-text editor, PDF viewer, gauges, barcode, editors, and much more. It also includes a unique set of controls for reading and writing Excel, Word, and PDF documents in Windows store apps.
                <ej:AccordionItem Text="Metro Studio">
                        Syncfusion Metro Studio is a collection of over 2500 Metro-style icon templates that can be easily customized to create thousands of unique Metro icons. 

    In the code behind, define the action to be performed under the Accordion pane click event.

  • C#
  • protected void BasicAccordion_AccordionPaneClick(object sender, Syncfusion.JavaScript.Web.AccordionEventArgs e)
        // e.ActiveIndex - to get the activated pane index
        // e.EventType - returns the event name