View Full Version : [CLOSED] How to check a menu item on the client?

Aug 02, 2013, 3:20 PM

Please advise how to properly check a menu item on the client. This sample runs fine but doesn't do the trick.

<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Ext.Net 2.x</title>
<ext:ResourcePlaceHolder ID="ResourcePlaceHolder1" runat="server" Mode="Script" />
<ext:ResourcePlaceHolder ID="ResourcePlaceHolder2" runat="server" Mode="Style" />
<script type="text/javascript">
var checkMenuItem = function () {
var menuSkin = App.MenuSkin;
var newTheme = "Neptune";
menuSkin.items.each(function (item) {
if (item.text == newTheme) {
item.checked = true;
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server">
<ext:Viewport runat="server" Layout="FitLayout">
<ext:Panel runat="server">
<ext:Toolbar runat="server">
<ext:Button ID="Button1" runat="server" Text="Check Neptune Theme">
<Click Handler="checkMenuItem();" />
<ext:Button ID="ButtonTheme" runat="server" Icon="Paintcan" Text="Select Theme..." AutoDataBind="true" >
<ext:Menu ID="MenuSkin" runat="server">
<ext:CheckMenuItem ID="MenuItemDefault" runat="server" Text="Default" Group="theme" Checked="true" />
<ext:CheckMenuItem ID="MenuItemGray" runat="server" Text="Gray" Group="theme" />
<ext:CheckMenuItem ID="MenuItemNeptune" runat="server" Text="Neptune" Group="theme" />
<ext:CheckMenuItem ID="MenuItemAccess" runat="server" Text="Access" Group="theme" />

Aug 02, 2013, 3:38 PM
Hi Vadym,

Please use:


P.S. We much appreciate that you always provide us with runnable samples.

Aug 02, 2013, 3:46 PM
Thanks much Daniil! I did have a sneaking suspicion that setting the property was wrong :). Please mark this question as closed.