-
Notifications
You must be signed in to change notification settings - Fork 137
Accordion
The Accordion control represents a series of panes that can be viewed one at a time. The control is used to create "strongly typed" access to the AccordionBehavior. Its major purpose is to structure the content in a way that the AccordionBehavior can understand it.
Name | Description |
---|---|
AutoSize | Determines how to controll resizing of the Accordion. If it is set to None, then the Accordion can grow as large or as small as necessary. If it is set to Limit, then the Accordion will always be less than or equal to its Height. If it is set to Fill then it will always be equal to its height. The default is None. |
ContentCssClass | The default Content CSS class |
ContentTemplate | A template for the content of databound panes |
Controls | Prevent the Controls property from appearing in the editor (so that people will use the Panes collection instead) |
DataMember | A member in the DataSource to bind to |
DataSource | The data source that provides data for populating the list of AccordionPanes |
DataSourceID | The ID of the DataControl that this control should use to retrieve its data source. When the control is bound to a DataControl, it can retrieve a data source instance on demand, and thereby attempt to work in auto-DataBind mode. |
FadeTransitions | Whether or not to use a fade effect when transitioning between selected Accordion Panes. The default is false |
FramesPerSecond | The number of frames per second used in animation effects' transition. This is used to tune performance when using FadeTransition, a large number of Accordion Panes, etc. The default is 30. |
HeaderCssClass | The default Header CSS class |
HeaderSelectedCssClass | The default selected Header CSS Class |
HeaderTemplate | A template for the Header of databound panes |
Panes | A collection of child panes in the Accordion |
RequireOpenedPane | Whether or not clicking the header will close the currently opened pane (leaving all the Accordion's panes closed). The default is true |
SelectedIndex | Index of the AccordionPane to be displayed (this property must be set before OnPreRender). The default is 0 |
SuppressHeaderPostbacks | Whether or not we suppress the client-side click handlers of any elements (including server controls like Button or HTML elements like anchor) in the header sections of the Accordion. The default is false |
TransitionDuration | Length of the transition animation in milliseconds. The default is 500 |
Name | Description |
---|---|
DataBind() | Bind the Accordion to its DataSource |
FindControl(id) | Override FindControl to look first at this control, then check each of its child AccordionPanes for the control |
Name | Description |
---|---|
ItemCommand | An event to raise when a command is fired |
ItemCreated | An event to raise when an item (i.e. Pane's Header or Content) is created during data binding |
ItemDataBound | An event to raise when an item (i.e. Pane's Header or Content) is data bound |
Name | Description |
---|---|
autoSize | Controls how the Accordion changes its size to occupy space on a web page. |
fadeTransitions | True - to use the fading transition effect for Accordion panes, false - for standard transitions. |
framesPerSecond | The number of steps per second in transition animations. The default value is 30 frames per second. |
headerCssClass | The name of the CSS class applied to headers. |
headerSelectedCssClass | The name of the CSS class applied to the selected header. |
requireOpenedPane | True - to force the Accordion to always have one pane expanded, false - to enable end-users to close all panes. |
selectedIndex | The index of a pane selected to display its content. |
suppressHeaderPostbacks | A Boolean value specifying whether the Accordion control will not be interrupted by the default click event of the anchor tag specified in the header element's template. If set to true, this property prevents any client event handler that may interrupt the activity of the Accordion control. |
transitionDuration | The number of milliseconds a transition effect takes to complete. The default value is 250ms. |
Name | Description |
---|---|
addPane(header, content) | Creates a new Accordion pane and adds it to the Panes collection. The method provides references to the created pane's header and content DIVs. |
getCount() | Returns the total number of panes. |
getPane(index) | Returns an Accordion pane specified by its index. If no index is provided, the currently selected pane is returned. |
Name | Description |
---|---|
selectedIndexChanged | Fires after a pane header is clicked and the Accordion changes the selected pane. |
selectedIndexChanging | Fires after a pane header is clicked but before the Accordion changes the selected pane. |
Controls how the Accordion changes its size to occupy space on a web page.
Remarks: If set to None, the Accordion grows/shrinks vertically without restriction when its pane is expanded/collapsed; this can cause other elements on a web page to move up and down with it. If set to Limit, the Accordion never grows larger than the value specified by its Height property; this will cause the Accordion content to scroll if it is too large to be displayed. If set to Fill, the Accordion always keeps the same size as its Height property. This will cause the content to be expanded or shrunk if it isn't of the right size.
Getter name: get_autoSize()
True - to use the fading transition effect for Accordion panes, false - for standard transitions.
Getter name: get_fadeTransitions()
Setter name: set_fadeTransitions(value)
The number of steps per second in transition animations. The default value is 30 frames per second.
Getter name: get_framesPerSecond()
Setter name: set_framesPerSecond(value)
The name of the CSS class applied to headers.
Getter name: get_headerCssClass()
Setter name: set_headerCssClass(value)
The name of the CSS class applied to the selected header.
Getter name: get_headerSelectedCssClass()
Setter name: get_headerSelectedCssClass(value)
True - to force the Accordion to always have one pane expanded, false - to enable end-users to close all panes.
Getter name: get_requireOpenedPane()
Setter name: set_requireOpenedPane(value)
The index of a pane selected to display its content.
Getter name: get_selectedIndex()
Setter name: set_selectedIndex(value)
A Boolean value specifying whether the Accordion control will not be interrupted by the default click event of the anchor tag specified in the header element's template. If set to true, this property prevents any client event handler that may interrupt the activity of the Accordion control.
Getter name: get_suppressHeaderPostbacks()
Setter name: set_suppressHeaderPostbacks(value)
The number of milliseconds a transition effect takes to complete. The default value is 250ms.
Getter name: get_transitionDuration()
Setter name: set_transitionDuration(value)
Bind the Accordion to its DataSource
Override FindControl to look first at this control, then check each of its child AccordionPanes for the control
Params:
-
id
- Type: String
- Description: ID of the control to find
Creates a new Accordion pane and adds it to the Panes collection. The method provides references to the created pane's header and content DIVs.
Params:
-
header
- Type: Object
- Description: header element of the new Accordion pane
-
content
- Type: Object
- Description: content element of the new Accordion pane
Returns the total number of panes.
Returns an Accordion pane specified by its index. If no index is provided, the currently selected pane is returned.
Params:
-
index
- Type: Number
- Description: index of the desired Accordion pane. If the index is not provided, we use the currently selected index. In the event the provided index (or the currently selected index) is outside the bounds of the panes collection, we return null.
Fires after a pane header is clicked and the Accordion changes the selected pane.
Add event handler method: add_selectedIndexChanged(handler)
Remove event handler method: remove_selectedIndexChanged(handler)
Raise event method: raise_selectedIndexChanged()
Fires after a pane header is clicked but before the Accordion changes the selected pane.
Add event handler method: add_selectedIndexChanging(handler)
Remove event handler method: remove_selectedIndexChanging(handler)
Raise event method: raise_selectedIndexChanging()
This content was moved from https://ajaxcontroltoolkit.codeplex.com/documentation to this Documentation wiki. This is now the authoritative location of the AJAX Control Toolkit documentation.
- Step-by-Step Installation Guide
- Upgrading from v7.x and below
- Uninstalling the AJAX Control Toolkit
- Troubleshooting Installer Issues
- Updating the Project from CI Builds
- How to Use Bundling and CDN
- Creating a Custom Localization
- Creating a Custom Control
- Design Standards
Controls:
- Accordion
- AjaxFileUpload
- AreaChart
- AsyncFileUpload
- BarChart
- BubbleChart
- ComboBox
- Editor (deprecated)
- Gravatar
- LineChart
- NoBot
- PieChart
- Rating
- ReorderList
- Seadragon
- TabContainer
- TabPanel
Extenders:
- AlwaysVisibleControl
- Animation
- AutoComplete
- BalloonPopup
- Calendar
- CascadingDropDown
- CollapsiblePanel
- ColorPicker
- ConfirmButton
- DragPanel
- DropDown
- DropShadow
- DynamicPopulate
- FilteredTextBox
- HoverMenu
- HtmlEditor
- ListSearch
- MaskedEdit
- MaskedEditValidator
- ModalPopup
- MultiHandleSlider
- MutuallyExclusiveCheckBox
- NumericUpDown
- PagingBulletedList
- PasswordStrength
- PopupControl
- ResizableControl
- RoundedCorners
- Slider
- SlideShow
- TextBoxWatermark
- ToggleButton
- UpdatePanelAnimation
- ValidatorCallout