Hi all,
Is there any way to enable and disable the full ultrawebtoolbar which has buttons and custom controls
using Javascript???
Hi
it worked fine...thanks
Hi ,
Loop thru each item of your toolbar.
Here is some JavaScript Code. I tested this and it worked.
function UltraWebToolbar1_InitializeToolbar(oToolbar, oEvent){ //Add code to handle your event here. var item = oToolbar.Items[0]; item.setEnabled(false);}
Here is my whole web page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="Infragistics2.WebUI.UltraWebNavigator.v8.2, Version=8.2.20082.2110, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.UltraWebNavigator" tagprefix="ignav" %><%@ Register assembly="Infragistics2.WebUI.WebDataInput.v8.2, Version=8.2.20082.2110, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.WebDataInput" tagprefix="igtxt" %><%@ Register assembly="Infragistics2.WebUI.UltraWebToolbar.v8.2, Version=8.2.20082.2110, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.UltraWebToolbar" tagprefix="igtbar" %>
<!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 runat="server"> <title>Untitled Page</title>
<script type="text/javascript" id="igClientScript"><!--
function UltraWebToolbar1_InitializeToolbar(oToolbar, oEvent){ //Add code to handle your event here. var item = oToolbar.Items[0]; item.setEnabled(false);}// --></script></head><body> <form id="form1" runat="server"> <div> <ignav:UltraWebMenu ID="UltraWebMenu1" runat="server"> <IslandStyle BackColor="LightGray" BorderStyle="Outset" BorderWidth="1px" Cursor="Default"> </IslandStyle> <HoverItemStyle BackColor="DarkBlue" Cursor="Default" ForeColor="White"> </HoverItemStyle> <Images> <SubMenuImage Url="ig_menuTri.gif" /> </Images> <ItemStyle Cursor="Default" /> <Items> <ignav:Item Text="Top Item"> <Items> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> </Items> </ignav:Item> <ignav:Item Text="Top Item"> <Items> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> </Items> </ignav:Item> </Items> <DisabledStyle Font-Names="MS Sans Serif" Font-Size="8pt" ForeColor="Gray"> </DisabledStyle> <Levels> <ignav:Level Index="0" /> </Levels> <SeparatorStyle BackgroundImage="ig_menuSep.gif" CssClass="SeparatorClass" CustomRules="background-repeat:repeat-x; " /><ExpandEffects ShadowColor="LightGray"></ExpandEffects> </ignav:UltraWebMenu> </div> <igtxt:WebMaskEdit ID="WebMaskEdit1" runat="server"> </igtxt:WebMaskEdit> <igtxt:WebTextEdit ID="WebTextEdit1" runat="server"> </igtxt:WebTextEdit> <igtbar:UltraWebToolbar ID="UltraWebToolbar1" runat="server"> <ClientSideEvents InitializeToolbar="UltraWebToolbar1_InitializeToolbar" /> <Items> <igtbar:TBarButton DisabledImage="" HoverImage="" Image="" SelectedImage="" Text="Button1"> </igtbar:TBarButton> <igtbar:TBSeparator /> <igtbar:TBarButton DisabledImage="" HoverImage="" Image="" SelectedImage="" Text="Button3"> </igtbar:TBarButton> <igtbar:TBSeparator /> <igtbar:TBarButton DisabledImage="" HoverImage="" Image="" SelectedImage="" Text="Button5"> </igtbar:TBarButton> </Items> </igtbar:UltraWebToolbar> </form></body></html>
Thanks for the links.but it didnt not work
I coded as below for the html button which does not postback
var toolbarpanel = igtbar_getToolbarById('<%=UltraWebToolbar1.ClientID %>');
toolbarpanel.Enabled = true;
I want to enable/diable the whoel toolbar and not its items
please help me to work this out ...
HI,
The client-side Item object has a setEnabled method.
Here is a help link to the Item Object
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/WebToolbar_Item_Object_CSOM.html
Here is a help link to the WebToolBar CSOM :
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/WebToolbar_CSOM_Overview.html