[CLOSED] ComboBox set selected item value

  1. #1

    [CLOSED] ComboBox set selected item value

    Hi,

    I have a ComboBox:
    <ext:ComboBox ID="ComboBox1" runat="server">
                <Items>
                    <ext:ListItem Value="aa\taa" Text="aa\taa" />
                    <ext:ListItem Value="bb\tbb" Text="bb\tbb" />
                    <ext:ListItem Value="cc\tcc" Text="cc\tcc" />
                </Items>
            </ext:ComboBox>
    and I set SeletedItem.Value in Page_Load method:
    protected void Page_Load(object sender, EventArgs e)
            {
                string a = "cc\tcc";
                ComboBox1.SelectedItem.Value = a;
            }
    and I got a wrong result: cc + Tab key + cc . I want to get "cc\tcc" in result. How can I do? Thanks!
    Last edited by Daniil; Nov 18, 2011 at 9:22 AM. Reason: Please use [CODE] tags
  2. #2

    RE: [CLOSED] ComboBox set selected item value

    Hi,

    "\t" it escape symbol (Tab)


    Try the following
    Value="aa\\taa"

Similar Threads

  1. [CLOSED] Always selected Item is nothing for combobox as menu item
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 04, 2011, 4:51 PM
  2. [CLOSED] get the value of the selected item from a combobox via js
    By Edward in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 03, 2010, 12:06 PM
  3. Get Combobox Selected item
    By yarlenvas in forum 1.x Help
    Replies: 3
    Last Post: Mar 08, 2009, 2:04 PM
  4. Get ComboBox Selected Item
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 18, 2008, 9:50 AM
  5. [FIXED] [V0.6] ComboBox and Selected Item
    By amitpareek in forum Bugs
    Replies: 2
    Last Post: Sep 16, 2008, 5:03 PM

Posting Permissions