selected value in MultiCombo

  1. #1

    selected value in MultiCombo

    Hi ,

    Please I can not get the selected value in MultiCombo in my C # code and add the selected value in a table INT [] TableValue.

    Thanks,
    difa
  2. #2
    Hi,

    Please look at the example.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void GetValue(object sender, DirectEventArgs e)
        {
            string values = "";
            foreach (SelectedListItem v in this.MultiCombo1.SelectedItems)
            {
                values += v.Value + " " + v.Text + "</br>";
            }
            X.Msg.Alert("Selected", values).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>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:MultiCombo ID="MultiCombo1" runat="server">
                <Items>
                    <ext:ListItem Text="Item 1" Value="1" />
                    <ext:ListItem Text="Item 2" Value="2" />
                </Items>
            </ext:MultiCombo>
            <ext:Button runat="server" Text="Get a value" OnDirectClick="GetValue" />
        </form>
    </body>
    </html>

Similar Threads

  1. MultiCombo not returning any selected items
    By dtamils in forum 1.x Help
    Replies: 3
    Last Post: Feb 27, 2013, 3:56 AM
  2. Replies: 4
    Last Post: Dec 27, 2011, 3:25 PM
  3. Replies: 0
    Last Post: Sep 19, 2011, 11:11 AM
  4. Replies: 5
    Last Post: Jun 08, 2011, 11:19 AM
  5. Replies: 1
    Last Post: Nov 17, 2010, 12:42 PM

Posting Permissions