<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="ToolBar.Examples.ClientSide.ClientEvents.DefaultCS" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<title>Telerik ASP.NET Example</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<script type="text/javascript">
//<![CDATA[
function onClientToolBarLoad(sender, args) {
logEvent("OnClientLoad: " + sender.get_id());
}
function clientButtonClicking(sender, args) {
logEvent("OnClientButtonClicking: " + args.get_item().get_text());
}
function clientButtonClicked(sender, args) {
logEvent("OnClientButtonClicked: " + args.get_item().get_text());
}
function clientDropDownOpening(sender, args) {
logEvent("OnClientDropDownOpening: " + args.get_item().get_text());
}
function clientDropDownOpened(sender, args) {
logEvent("OnClientDropDownOpened: " + args.get_item().get_text());
}
function clientDropDownClosing(sender, args) {
logEvent("OnClientDropDownClosing: " + args.get_item().get_text());
}
function clientDropDownClosed(sender, args) {
logEvent("OnClientDropDownClosed: " + args.get_item().get_text());
}
function clientContextMenu(sender, args) {
logEvent("OnClientContextMenu: " + args.get_item().get_text());
}
function clientMouseOver(sender, args) {
logEvent("OnClientMouseOver: " + args.get_item().get_text());
}
function clientMouseOut(sender, args) {
logEvent("OnClientMouseOut: " + args.get_item().get_text());
}
function clientCheckedStateChanging(sender, args) {
logEvent("OnClientCheckedStateChanging: " + args.get_item().get_text());
}
function clientCheckedStateChanged(sender, args) {
logEvent("OnClientCheckedStateChanged: " + args.get_item().get_text());
}
//]]>
</script>
<div class="demo-container size-narrow">
<telerik:RadToolBar RenderMode="Lightweight" ID="RadToolBar1" runat="server" EnableRoundedCorners="true" EnableShadows="true"
OnClientLoad="onClientToolBarLoad" OnClientButtonClicking="clientButtonClicking"
OnClientButtonClicked="clientButtonClicked" OnClientDropDownOpening="clientDropDownOpening"
OnClientDropDownOpened="clientDropDownOpened" OnClientDropDownClosing="clientDropDownClosing"
OnClientDropDownClosed="clientDropDownClosed" OnClientContextMenu="clientContextMenu"
OnClientMouseOver="clientMouseOver" OnClientMouseOut="clientMouseOut" OnClientCheckedStateChanging="clientCheckedStateChanging"
OnClientCheckedStateChanged="clientCheckedStateChanged">
<Items>
<telerik:RadToolBarButton Text="Select" AllowSelfUnCheck="True" CheckOnClick="True">
</telerik:RadToolBarButton>
<telerik:RadToolBarButton Text="Save">
</telerik:RadToolBarButton>
<telerik:RadToolBarButton Text="Load">
</telerik:RadToolBarButton>
<telerik:RadToolBarDropDown Text="Format">
<Buttons>
<telerik:RadToolBarButton Text="Bold" CheckOnClick="true" Group="FormatBold" Checked="true">
</telerik:RadToolBarButton>
<telerik:RadToolBarButton Text="Italic" CheckOnClick="true" Group="FormatItalic">
</telerik:RadToolBarButton>
<telerik:RadToolBarButton Text="Underline" CheckOnClick="true" Group="FormatUnderline">
</telerik:RadToolBarButton>
</Buttons>
</telerik:RadToolBarDropDown>
<telerik:RadToolBarSplitButton Text="Apply Color (Red)" EnableDefaultButton="false">
<Buttons>
<telerik:RadToolBarButton Text="Red" CheckOnClick="true" Group="ApplyColor" Checked="true">
</telerik:RadToolBarButton>
<telerik:RadToolBarButton Text="Blue" CheckOnClick="true" Group="ApplyColor">
</telerik:RadToolBarButton>
<telerik:RadToolBarButton Text="Yellow" CheckOnClick="true" Group="ApplyColor">
</telerik:RadToolBarButton>
</Buttons>
</telerik:RadToolBarSplitButton>
</Items>
</telerik:RadToolBar>
<telerik:RadContextMenu id="RadContextMenu1" runat="server">
<Targets>
<telerik:ContextMenuControlTarget ControlID="RadToolBar1" />
</Targets>
<Items>
<telerik:RadMenuItem Text="Edit" Value="E" />
<telerik:RadMenuItem Text="Add" Value="A" />
<telerik:RadMenuItem Text="Delete" Value="D" />
</Items>
</telerik:RadContextMenu>
</div>
<qsf:EventLogConsole runat="server" ID="EventLogConsole1" Height="200px"></qsf:EventLogConsole>
<qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1" Title="Logged events" Orientation="Vertical" Expanded="true">
<Views>
<qsf:View>
<asp:CheckBoxList ID="cblLoggedEvents" runat="server" AutoPostBack="true" OnSelectedIndexChanged="cblLoggedEvents_SelectedIndexChanged">
<asp:ListItem Text="OnClientLoad" Selected="true"></asp:ListItem>
<asp:ListItem Text="OnClientButtonClicking" Selected="true"></asp:ListItem>
<asp:ListItem Text="OnClientButtonClicked" Selected="true"></asp:ListItem>
<asp:ListItem Text="OnClientDropDownOpening" Selected="true"></asp:ListItem>
<asp:ListItem Text="OnClientDropDownOpened" Selected="true"></asp:ListItem>
<asp:ListItem Text="OnClientDropDownClosing" Selected="true"></asp:ListItem>
<asp:ListItem Text="OnClientDropDownClosed" Selected="true"></asp:ListItem>
<asp:ListItem Text="OnClientContextMenu" Selected="true"></asp:ListItem>
<asp:ListItem Text="OnClientMouseOver" Selected="true"></asp:ListItem>
<asp:ListItem Text="OnClientMouseOut" Selected="true"></asp:ListItem>
<asp:ListItem Text="OnClientCheckedStateChanging" Selected="true"></asp:ListItem>
<asp:ListItem Text="OnClientCheckedStateChanged" Selected="true"></asp:ListItem>
</asp:CheckBoxList>
</qsf:View>
</Views>
</qsf:ConfiguratorPanel>
</form>
</body>
</html>