Click or drag to resize
KaxToolBarOnClientDropDownOpened Property
Gets or sets a value indicating the client-side event handler that is called after a toolbar dropdown item (KaxToolBarDropDown or KaxToolBarSplitButton) is opened.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public string OnClientDropDownOpened { get; set; }

Property Value

Type: String
A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.
Remarks

Use the OnClientDropDownOpened property to specify a JavaScript function that will be executed after a toolbar dropdown item is opened - either by left-clicking it with the mouse or hitting the down arrow after tabbing to that item.

Two parameters are passed to the handler

  • sender (the client-side KaxToolBar object)
  • eventArgs with two properties
    • item - the instance of the dropdown item which is opened
    • domEvent - the reference to the browser DOM event (null if the event was initiated by calling a client-side method such as dropDownItem.showDropDown())

Examples
The following example demonstrates how to use the OnClientDropDownOpened property.

<script language="javascript">
function clientDropDownOpened(sender, eventArgs)
{
var toolBar = sender;
var dropDownItem = eventArgs.get_item();

alert("You just opened the '" + dropDownItem.get_text() + "' dropDown in the '" + toolBar.get_id() + "' toolBar.");

}
</script>

<kettic:KaxToolBar id="KaxToolBar1" runat="server" OnClientDropDownOpened="clientDropDownOpened">
<Items>
<kettic:KaxToolBarButton Text="Left"></kettic:KaxToolBarButton>
<kettic:KaxToolBarButton Text="Center"></kettic:KaxToolBarButton>
<kettic:KaxToolBarButton Text="Right"></kettic:KaxToolBarButton>
<kettic:KaxToolBarDropDown Text="Align">
<Buttons>
<kettic:KaxToolBarButton Text="Left"></kettic:KaxToolBarButton>
<kettic:KaxToolBarButton Text="Center"></kettic:KaxToolBarButton>
<kettic:KaxToolBarButton Text="Right"></kettic:KaxToolBarButton>
</Buttons>
</kettic:KaxToolBarDropDown>
<kettic:KaxToolBarSplitButton Text="Right">
<Buttons>
<kettic:KaxToolBarButton Text="Left"></kettic:KaxToolBarButton>
<kettic:KaxToolBarButton Text="Center"></kettic:KaxToolBarButton>
<kettic:KaxToolBarButton Text="Right"></kettic:KaxToolBarButton>
</Buttons>
</kettic:KaxToolBarSplitButton>
</Items>
</kettic:KaxToolBar>

See Also