Color Palette inside Button Menu - Don't load value in page load.

  1. #1

    [CLOSED] Color Palette inside Button Menu - Don't load value in page load.

    First, sorry for the bad english.

    I'm using a color palette inside a button menu. This palette has a Ajax Event, who change a label text.
    This method work's fine when i select a color. But it's not working in the page load.

    The code:
                    <ext:Button Text="Selecione uma cor" Icon="Color" runat="server" ID="btnCor"  IsFormField="true" >
                            <ext:Menu ID="menuCor" runat="server" RenderToForm="true" >
                                    <ext:Panel runat="server" ID="pnlCor" Border="false" Header="false">
                                        <ext:ColorPalette   runat="server" ID="campoCor"  PropertyName="Cor"  >
                                                <Select OnEvent="AjaxColor_Changed" ></Select>    
    				<ext:Label ID="campoCorSelecionada" AutoRender="true" runat="server" />
            protected void AjaxColor_Changed(object sender, DirectEventArgs e)
            protected void LoadColorLabel(string cor )
                if (!string.IsNullOrEmpty(cor))
                    string tpl = "Selected color: #<span style='color:#{0}; font-weight:bold;' >{0}</span>";
                    campoCorSelecionada.Text = string.Format(tpl, cor);
    		protected void Page_Load(object sender, EventArgs e)
                if (!string.IsNullOrEmpty(color))
                    campoCor.Value = color;
    The page_load don't show the label and not set the value of color palette. And the javascript show this error:
    Uncaught type error: Cannot call method 'child' of undefined
    Last edited by Srgio; Dec 12, 2012 at 4:33 PM.
  2. #2


    Thanks for all atention.
    The solution: use <paleteName>.render() and <labelName>.render(); after set the values.

Similar Threads

  1. Load Ext:Gridpanel Conditionally on Page Load
    By kabirnig2405 in forum 1.x Help
    Replies: 0
    Last Post: Sep 02, 2011, 10:09 AM
  2. [CLOSED] Stop treepanel to load data on page load
    By inayath in forum 1.x Premium Help
    Replies: 1
    Last Post: Feb 11, 2011, 11:17 AM
  3. Replies: 3
    Last Post: Jun 28, 2010, 4:37 PM
  4. how to load data to grid panel in page load
    By andylaiyongsing in forum 1.x Help
    Replies: 1
    Last Post: Apr 16, 2010, 11:27 AM
  5. Replies: 13
    Last Post: Feb 24, 2010, 6:34 PM

Tags for this Thread

Posting Permissions