SelectListItem of MultiCombo not working

  1. #1

    SelectListItem of MultiCombo not working

    Dear Sir,

    I am using MultiCombo control. Here is the code.

    <ext:MultiCombo ID="MultiCombo1" runat="server" Width="260">
                <Items>
                    <ext:ListItem Text="Item 1" Value="1" />
                    <ext:ListItem Text="Item 2" Value="2" />
                    <ext:ListItem Text="Item 3" Value="3" />
                    <ext:ListItem Text="Item 4" Value="4" />
                    <ext:ListItem Text="Item 5" Value="5" />
                </Items>
                </ext:MultiCombo>
    
                    <ext:Button runat="server" ID="btnSave" Text="Save">
                        <DirectEvents>
                            <Click OnEvent="GetData"></Click>
                        </DirectEvents>
                    </ext:Button>
    On button click I am trying to set selected values.

      protected void GetData(object sender, DirectEventArgs e)
        {
            MultiCombo1.SelectedItems.Add(new SelectedListItem("2"));
            //MultiCombo1.Render();
        }
    But After button click no items are selected.
    when I add MultiCombo1.Render(); line I can see the combo with selected records but there are two combo one with selected records and one with empty text record.

    please guide me.

    Thanks
    Rupesh
    Last edited by Rupesh; May 24, 2012 at 10:16 AM.

Similar Threads

  1. Replies: 3
    Last Post: Feb 21, 2012, 7:46 AM
  2. Replies: 2
    Last Post: Apr 04, 2011, 12:32 PM
  3. [CLOSED] [1.0] MultiCombo Change listener not working as expected
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Aug 20, 2010, 3:06 PM
  4. [CLOSED] SelectItem not working for MultiCombo
    By klaus.schwarz in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 12, 2010, 9:58 AM

Posting Permissions