[CLOSED] Using InsertItem to populate SelectBox does not return correct SelectedItem value

  1. #1

    [CLOSED] Using InsertItem to populate SelectBox does not return correct SelectedItem value

    Using InsertItem to populate SelectBox does not return correct SelectedItem value, instead it is returning the text part. Please use the following code to test, thank you so much:

    
    <%@ Page Language="C#"  %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
       
        [DirectMethod]
        public void load()
        {
           sbxTest.InsertItem(0, "a", "1");       
           sbxTest.InsertItem(0, "b", "2");       
           sbxTest.InsertItem(0, "c", "3");       
    
        }
    
         [DirectMethod]
        public void getSelected()
        {
           X.MessageBox.Alert("test", "value:" + sbxTest.SelectedItem.Value).Show(); 
    
        }
      
    </script>
    
    <!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></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
         <ext:SelectBox ID="sbxTest" runat="server"  FieldLabel="Test"  LabelWidth="150"  Padding="5">  </ext:SelectBox>
        <ext:button runat="server" text="load values">
        <Listeners>
            <Click Handler="#{DirectMethods}.load()"></Click>
        </Listeners>
    </ext:button>
    
      <ext:button runat="server" text="Get selected">
        <Listeners>
            <Click Handler="#{DirectMethods}.getSelected()"></Click>
        </Listeners>
    </ext:button>
        </form>
    </body>
    </html>
    Last edited by Daniil; Jun 18, 2012 at 9:39 PM. Reason: [CLOSED]
  2. #2
    I compiled the latest code from the SVN and it behaves correctly now. I think it is fixed somehow along the other bugs
  3. #3
    Hi,

    It has been fixed just today. Anyways, thanks for the report.

Similar Threads

  1. Replies: 4
    Last Post: Jul 25, 2012, 6:45 AM
  2. [CLOSED] What is the correct syntax for this?
    By jmcantrell in forum 1.x Premium Help
    Replies: 21
    Last Post: Jul 10, 2012, 10:59 PM
  3. Replies: 4
    Last Post: Oct 24, 2011, 4:34 AM
  4. [CLOSED] GridPanel: correct way to get the row number
    By asztern in forum 1.x Premium Help
    Replies: 1
    Last Post: Sep 09, 2010, 12:48 PM
  5. [CLOSED] [1.0] combobox InsertItem error
    By PoloTheMonk in forum 1.x Premium Help
    Replies: 2
    Last Post: Mar 15, 2010, 9:45 AM

Tags for this Thread

Posting Permissions