KaxToolBarOnClientButtonClicked Property |
Gets or sets a value indicating the client-side event handler that is called
after clicking a button item (KaxToolBarButton or KaxToolBarSplitButton).
Namespace: Kettic.AspNet.ControlsAssembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntaxpublic string OnClientButtonClicked { get; set; }
Public Property OnClientButtonClicked As String
Get
Set
public:
property String^ OnClientButtonClicked {
String^ get ();
void set (String^ value);
}
member OnClientButtonClicked : string with 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.
RemarksUse the OnClientButtonClicked property to specify a JavaScript
function that will be executed after a button is clicked - either by left-clicking it
with the mouse or hitting enter after tabbing to that button item.
Two parameters are passed to the handler
- sender (the client-side KaxToolBar object)
-
eventArgs with two properties
- item - the instance of the clicked button
- domEvent - the reference to the browser DOM event
Examples
The following example demonstrates how to use the
OnClientButtonClicked property.
<script language="javascript">
function clientButtonClicked(sender, eventArgs)
{
var toolBar = sender;
var button = eventArgs.get_item();
alert(String.format("You clicked the '{0}' button in the '{1}' toolBar.",
button.get_text(), toolBar.get_id()));
}
</script>
<kettic:KaxToolBar id="KaxToolBar1" runat="server"
OnClientButtonClicked="clientButtonClicked">
<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