[CLOSED] how reset a combobox to the default state

  1. #1

    [CLOSED] how reset a combobox to the default state

    I can use the reset() method to reset a textfield ,but when use the reset() method to a combobox control,it doesn't work
    Click image for larger version. 

Name:	QQ截图20130613090812.png 
Views:	18 
Size:	4.6 KB 
ID:	6363

     this.Accformats.Reset();
     this.Cclass.Reset();
     this.Ccode.Reset();
     this.Cname.Reset();
    Last edited by Daniil; Jun 18, 2013 at 4:02 AM. Reason: [CLOSED]
  2. #2
    Hello!

    Can you provide a sample to reproduce? I've tried the following sample and it works fine:

    <%@ Page Language="C#" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET Examples</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
       
        <ext:ComboBox runat="server" ID="ComboBox1">
            <Items>
                <ext:ListItem Value="1" Text="1" />
                <ext:ListItem Value="2" Text="2" />
            </Items>
        </ext:ComboBox>
        
        <ext:Button runat="server" Text="Reset">
            <Listeners>
                <Click Handler="#{ComboBox1}.reset();"></Click>
            </Listeners>
        </ext:Button>
        
        <ext:Button runat="server" Text="Show Value">
            <Listeners>
                <Click Handler="alert(#{ComboBox1}.getValue());"></Click>
            </Listeners>
        </ext:Button>
    </body>
    </html>

Similar Threads

  1. [CLOSED] ComboBox state
    By jchau in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 08, 2013, 3:11 PM
  2. [CLOSED] Reload a control to its default/original display state
    By MacGarnicle in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Apr 25, 2012, 2:35 PM
  3. [CLOSED] Reset GridPanel columns to initial state
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Jul 18, 2011, 5:21 PM
  4. [CLOSED] [1.0] Reset and ComboBox
    By FVNoel in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Jun 09, 2011, 8:20 AM
  5. Replies: 3
    Last Post: Dec 03, 2010, 4:27 PM

Posting Permissions