[CLOSED] MultiCombo Keep selection during page transitions

  1. #1

    [CLOSED] MultiCombo Keep selection during page transitions

    What I'm doing wrong when I use a store to populate MultiCombo.

    As you can see in the example bellow the MultiCombo doesn't keep the selection if I click next page and select new records.

    Here is a code to reproduce this error.

    Design
    <body>
        <ext:ResourceManager ID="ResourceManager1" runat="server">
        </ext:ResourceManager>
        <form id="form1" runat="server">
        <ext:MultiCombo runat="server" ID="myCombo" PageSize="5" Width="250" SelectionMode="All">
            <Store>
                <ext:Store runat="server">
                    <Reader>
                        <ext:ArrayReader>
                            <Fields>
                                <ext:RecordField Name="text" />
                                <ext:RecordField Name="value" />
                            </Fields>
                        </ext:ArrayReader>
                    </Reader>
                </ext:Store>
            </Store>
        </ext:MultiCombo>
        </form>
    </body>
    Code behind
     protected void Page_Load(object sender, EventArgs e)
            {
                if (!X.IsAjaxRequest)
                {
                    //popular a combobox
                    var store = myCombo.GetStore();
                    store.DataSource = Data;
                    store.DataBind();
                }
            }
    
            private object[] Data
            {
                get
                {
                    object[] result = new object[100];
    
                    for (int i = 0; i < 100; i++)
                    {
                        result[i] = new object[]
                        {
                            "text " + i,
                            "value " + i
                        };
                    }
    
                    return result;
                }
            }
    I tried this example,
    http://forums.ext.net/showthread.php...n-through-page

    But doesn't work as expected.
    Last edited by Daniil; Feb 08, 2013 at 11:45 AM. Reason: [CLOSED]
  2. #2
    Hi Marcelo,

    There is no a baked in option to maintain selection through pages. This functionality is available for a GridPanel only.

    The Store's BeforeLoad and Load events are at your service to try to implement it manually.
  3. #3
    Hi Daniil,

    Thanks for the answer. Not a good news, but no problem I'll try another approaching.

    Please. Mark as closed.

    []'s

Similar Threads

  1. Replies: 5
    Last Post: Jan 14, 2013, 6:00 AM
  2. Replies: 1
    Last Post: Dec 04, 2012, 8:46 AM
  3. MultiCombo - Determine if Selection Client Side
    By Tbaseflug in forum 2.x Help
    Replies: 1
    Last Post: Oct 12, 2012, 11:56 PM
  4. [CLOSED] MultiCombo selection via script
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 7
    Last Post: Sep 21, 2012, 12:44 PM
  5. MultiCombo that Remember Selection through page
    By MichaelSogos in forum Examples and Extras
    Replies: 1
    Last Post: Sep 21, 2011, 3:50 PM

Posting Permissions