Home / AJAX

Ajax Control Toolkit DropDown

RSS
Modified on 2010/04/16 00:14 by Stephen Walther Categorized as Uncategorized
DropDown is an ASP.NET AJAX extender that can be attached to almost any ASP.NET control to provide a SharePoint-style drop-down menu. The displayed menu is merely another panel or control. In the above sample the drop-down is a Panel which contains LinkButtons. The drop-down is activated by left- or right-clicking the attached control. If the behavior is attached to a Hyperlink or LinkButton, clicking on the link itself will operate normally.

DropDown Server Reference

The properties in italics are optional.

<ajaxToolkit:DropDownExtender runat="server" ID="DDE"
    TargetControlID="TextLabel" 
    DropDownControlID="DropPanel" />

  • TargetControlID - The ID of the control which needs a drop-down.
  • DropDownControlID - The ID of the control which will be displayed as the dropdown.
  • Animations - Generic animations for the DropDown extender. See the Using Animations walkthrough and Animation Reference for more details.
    • OnShow - The OnShow animation will be played each time the dropdown is displayed. The dropdown will be positioned correctly but hidden. The animation can use to display the dropdown along with any other visual effects.
    • OnHide - The OnHide animation will be played each time the dropdown is hidden.

DropDown Client Reference

Sys.Extended.UI.DropDownBehavior Class

  • Summary - The DropDown control allows you to add drop down list to an element.
  • Parameters - Sys.UI.DomElement element

Events

  • showing(handler) - Add or removes an event handler for the showing event.
    • Parameters - A function representing the event handler.
  • shown(handler) - Add or removes an event handler for the shown event.
    • Parameters - A function representing the event handler.
  • popup(handler) - Add or removes an event handler for the popup event.
    • Parameters - A function representing the event handler.
    • Remarks - OBSOLETE - Use the shown event instead.
  • hiding(handler) - Add or removes an event handler for the hiding event.
    • Parameters - A function representing the event handler.
  • hidden(handler) - Add or removes an event handler for the hidden event.
    • Parameters - A function representing the event handler.
  • hoverOver(handler) - Add or removes an event handler for the hoverOver event.
    • Parameters - A function representing the event handler.
  • hoverOut(handler) - Add or removes an event handler for the hoverOut event.
    • Parameters - A function representing the event handler.

Methods

  • initialize() - Initializes the DropDown control's behavior.
  • dipose() - Disposes the DropDown control's behavior.
  • hover() - Positions and sets style of DropDown list.
  • unhover() - Clears settings related to hovering over the DropDown list.
  • show() - Shows the DropDown list.
  • hide() - Hides the DropDown list.
  • onShow() - Play the OnShow animation.
  • onHide() - Play the OnHide animation.
  • raiseShowing(Sys.EventArgs) - Raises the showing event.
    • Parameters - A Sys.EventArgs object representing event arguments for the showing event.
  • raiseShown(Sys.EventArgs) - Raises the shown event.
    • Parameters - A Sys.EventArgs object representing event arguments for the shown event.
  • raisePopup(Sys.CancelEventArgs) - Raises the popup event.
  • raiseHiding(Sys.EventArgs) - Raises the hiding event.
    • Parameters - A Sys.EventArgs object representing event arguments for the hiding event.
  • raiseHidden(Sys.EventArgs) - Raises the hidden event.
    • Parameters - A Sys.EventArgs object representing event arguments for the hidden event.
  • raiseHoverOver(Sys.EventArgs) - Raises the hoverOver event.
    • Parameters - A Sys.EventArgs object representing event arguments for the hoverOver event.
  • raiseHoverOut(Sys.EventArgs) - Raises the hoverOverout event.
    • Parameters - A Sys.EventArgs object representing event arguments for the hoverOverout event.

Properties

  • onShow - Gets or sets a generic OnShow animation's JSON definition.
  • onShowBehavior - Gets a Sys.Extended.UI.Animation.GenericAnimationBehavior object containing the generic OnShow animation's behavior.
  • onHide - Gets or sets a generic OnHide animation's JSON definition.
  • onHideBehavior - Gets a Sys.Extended.UI.Animation.GenericAnimationBehavior object containing the generic OnHide animation's behavior.
  • dropDownControl - Gets or sets the DropDown control.
  • highlightBorderColor - Gets or sets the highlight border color of the DropDown control.
  • highlightBackgroundColor - Gets or sets the highlight background color of the DropDown control.
  • dropArrowBackgroundColor - Gets or sets the DropDown arrow background color of the DropDown control.
  • dropArrowImageUrl - Gets or sets the DropDown arrow image URL of the DropDown control.
  • dropArrowWidth - Gets or sets the DropDown arrow width of the DropDown control.
  • isOver - Gets a Boolean value that specifies whether the cursor is over the DropDown control.
  • isOpen - Get a Boolean value that specifies whether the DropDown control is open.