[CLOSED] MultiSelect with Checkbox Items

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] MultiSelect with Checkbox Items

    I am finding I need to have a checkbox in my multiselect control. Ideally it would be nice if multiselect supported SelectionMode="Checkbox" or SelectionMode="All" like MultiCombo.

    It's hard to tell when items are selected (when all items are initially set to selected or unselected) if clicking an item is selecting or deselecting, especially if there is only 1 item in the list. It becomes a guessing game of whether dark means selected or light does.

    Any thoughts how to add a checkbox? Ideally I wish to be able to bind listitems, not a checkbox group. Not only that but checkboxes don't highlight select.
    Last edited by Daniil; Oct 18, 2013 at 4:56 AM. Reason: [CLOSED]
  2. #2
    Would it be anywhere close to as easy to add as this?
    http://stackoverflow.com/questions/6...ith-checkboxes
  3. #3
    Hi @michaeld,

    I can suggest the following.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    
        <style>
            .my-multiselect .x-boundlist-item {
                background-image: url("/extnet/resources/images/grid/unchecked-gif/ext.axd");
                background-repeat: no-repeat;
                background-position: 1px 1px;
                padding-left: 18px;
            }
    
            .my-multiselect .x-boundlist-selected {
                background-image: url("/extnet/resources/images/grid/checked-gif/ext.axd");
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:MultiSelect runat="server" Cls="my-multiselect">
                <Items>
                    <ext:ListItem Text="Item 1" />
                    <ext:ListItem Text="Item 2" />
                    <ext:ListItem Text="Item 3" />
                </Items>
            </ext:MultiSelect>
        </form>
    </body>
    </html>
  4. #4

    Feature Request

    Thank you. As this was such an easy feature to add, may I ask this item escalate it to becoming a feature request to add SelectionMode parameter? It seems totally appropriate here to match it to multiselectcombo. Do you mind adding this to the list or passing it on to extjs to do so (if you think it's more suitable in their feature-set)?
  5. #5
    Thank you for the feature request. We added the ShowCheckbox property.

    Example
    <ext:MultiSelect runat="server" ShowCheckbox="true">
        <Items>
            <ext:ListItem Text="Item 1" />
            <ext:ListItem Text="Item 2" />
            <ext:ListItem Text="Item 3" />
        </Items>
    </ext:MultiSelect>
  6. #6

    Amazing!

    Thank you. Awesome! I'll keep an eye on the trunk. I hasn't been checked in yet.

Similar Threads

  1. How to add items to a MultiSelect??
    By javito in forum 1.x Help
    Replies: 1
    Last Post: May 06, 2010, 5:57 PM
  2. MultiSelect - Dynamic Set Items?
    By Zhivko in forum 1.x Help
    Replies: 1
    Last Post: Apr 15, 2010, 8:11 PM
  3. [CLOSED] Adding Checkbox items to checkbox group during a postback?
    By vedagopal2004 in forum 1.x Legacy Premium Help
    Replies: 19
    Last Post: Feb 05, 2010, 10:13 AM
  4. Replies: 0
    Last Post: Jun 03, 2009, 5:30 PM
  5. How to add remove Items in MultiSelect
    By designworxz in forum 1.x Help
    Replies: 1
    Last Post: Mar 11, 2009, 8:25 AM

Tags for this Thread

Posting Permissions