[CLOSED] MultiCombo (combo with multi select) and paging is not working

  1. #1

    [CLOSED] MultiCombo (combo with multi select) and paging is not working

    We use a MultiCombo control which lets us select multiple values from a big list. The list can be more than 1000 records so we need to implement paging. Unfortunately each time the user changes page, the control loses the memory of what was previously selected.

    I would really appreciate it if you would solve this at your end.

    I saw online that someone found a solution but it seems very complex to implement, especially to new users like myself. This to me feels like a basic feature that needs to be solved at ext.net level.

    Thank you for your consideration
    Last edited by Daniil; Jan 21, 2014 at 4:42 AM. Reason: [CLOSED]
  2. #2
    Hi @Ariel,

    I agree with you, it looks a basic feature. Unfortunately, it is not that simple to achieve that in the context of MultiCombo.

    The best we can suggest you at the moment - use a common ComboBox and save selected items manually.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @Ariel,

    I agree with you, it looks a basic feature. Unfortunately, it is not that simple to achieve that in the context of MultiCombo.

    The best we can suggest you at the moment - use a common ComboBox and save selected items manually.

    Do you or someone else has sample code?
  4. #4
    It is what I meant.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.ComboBox1.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] { "1", "Item 1" },
                    new object[] { "2", "Item 2" },
                    new object[] { "3", "Item 3" }
                };
            }
        }
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    
        <script>
            var onSelect = function (comboBox, records) {
                var data = records[0].data;
    
                App.MultiCombo1.addItem(data[comboBox.displayField], data[comboBox.valueField]);
                App.MultiCombo1.selectAll();
            };
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:ComboBox 
                ID="ComboBox1" 
                runat="server" 
                DisplayField="text" 
                ValueField="value"
                FieldLabel="Pick one">
                <Store>
                    <ext:Store runat="server">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="value" />
                                    <ext:ModelField Name="text" />
                                </Fields>
                            </ext:Model>
                        </Model>
                        <Reader>
                            <ext:ArrayReader />
                        </Reader>
                    </ext:Store>
                </Store>
                <Listeners>
                    <Select Fn="onSelect" />
                </Listeners>
            </ext:ComboBox>
            
            <ext:MultiCombo 
                ID="MultiCombo1" 
                runat="server" 
                MultiSelect="true"
                FieldLabel="Picked" />
        </form>
    </body>
    </html>
    The example is not complete. It requires, at least, validation to avoid checking the same item twice and a possibility to uncheck the items.

Similar Threads

  1. [CLOSED] Turn off multiselect in MultiCombo
    By jchau in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 02, 2013, 7:01 AM
  2. Multicombo or Multiselect with sequence order
    By Birgit in forum 2.x Help
    Replies: 4
    Last Post: Nov 28, 2012, 7:18 AM
  3. MultiCombo is not working using Template
    By krishna in forum 1.x Help
    Replies: 0
    Last Post: Oct 25, 2012, 9:41 AM
  4. Replies: 0
    Last Post: Sep 19, 2011, 11:11 AM
  5. [CLOSED] Turn off multiselect in MultiCombo
    By jchau in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 04, 2011, 9:33 PM

Tags for this Thread

Posting Permissions