[CLOSED] MultiCombo

  1. #1

    [CLOSED] MultiCombo

    Ext.NET v5 Web Forms had a MultiCombo control (https://examples5.ext.net/#/Form/ComboBox/MultiCombo) which operated like a combo box but with multi-select capabilities. What's the equivalent to this in Ext.NET v7.x?

    Thanks

    Paul
  2. #2
    Hello, Paul!

    It would be the Ext JS's Tag Field.

    You can try the deprecated multiSelect="true", but that's going to be removed in a future release without further notice, so it doesn't sound safe to rely on it.

    Page View
    @page
    @model ExtNet7WebPages_NuGet.Pages.Forums._6._3._0_2.t63161_comboBoxMultiSelectModel
    @{ Layout = null; }
    
    <!DOCTYPE html>
    
    <html>
    <head>
        <title>
            63161 - ComboBox for multiple selection
        </title>
    </head>
    <body>
        <h1>
            MultiSelect alternative to Ext.NET 7
        </h1>
    
        <p>
            This is a simple and pure combo box
        </p>
        <ext-comboBox fieldLabel="Simple combo" displayField="text" valueField="id">
            <store>
                <ext-store data="@Model.ComboData" />
            </store>
        </ext-comboBox>
    
        <p>
            The <code>x-multiSelect</code> property forces passing <code>multiSelect: true</code>
            to the rendered scripts thus using the deprecated setting. This may stop working
            at any moment without previous notice and its current implementation is not
            guaranteed to work 100%.
        </p>
        <ext-comboBox fieldLabel="Deprecated combo" displayField="text" valueField="id" x-multiSelect="true">
            <store>
                <ext-store data="@Model.ComboData" />
            </store>
        </ext-comboBox>
    
        <p>
            The <code>ext-tagField</code> component is an extension of the <code>ext-comboBox</code>
            that properly implements multiple selection.
        </p>
        <ext-tagField fieldLabel="TagField combo" displayField="text" valueField="id">
            <store>
                <ext-store data="@Model.ComboData" />
            </store>
        </ext-tagField>
    </body>
    </html>
    Model
    using System.Collections.Generic;
    using Microsoft.AspNetCore.Mvc.RazorPages;
    
    namespace ExtNet7WebPages_NuGet.Pages.Forums._6._3._0_2
    {
        public class t63161_comboBoxMultiSelectModel : PageModel
        {
            public List<object> ComboData = new List<object>()
            {
                new { id = 1, text = "One"},
                new { id = 2, text = "Two"},
                new { id = 3, text = "Three"},
                new { id = 4, text = "Four"},
                new { id = 5, text = "Five"},
                new { id = 6, text = "Six"},
                new { id = 7, text = "Seven"},
                new { id = 8, text = "Eight"},
                new { id = 9, text = "Nine"},
                new { id = 10, text = "Ten"},
                new { id = 11, text = "Eleven"}
            };
    
            public void OnGet()
            {
            }
        }
    }
    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Thanks, we'll take a look at the Tag component and see if it meets our needs.

Similar Threads

  1. [CLOSED] MultiCombo
    By opendat2000 in forum 4.x Legacy Premium Help
    Replies: 6
    Last Post: Dec 09, 2016, 2:55 PM
  2. MultiCombo and IE8
    By Birgit in forum 2.x Help
    Replies: 1
    Last Post: Dec 07, 2012, 9:15 AM
  3. [CLOSED] MultiCombo
    By softmachine2011 in forum 2.x Legacy Premium Help
    Replies: 20
    Last Post: Aug 02, 2012, 11:56 AM
  4. How to add a multicombo in gridpanel?
    By reezvi in forum 1.x Help
    Replies: 0
    Last Post: Mar 23, 2012, 8:04 PM
  5. selected value in MultiCombo
    By difa in forum 1.x Help
    Replies: 1
    Last Post: Dec 08, 2011, 1:30 PM

Posting Permissions