[CLOSED] MultiCombo with two columns

  1. #1

    [CLOSED] MultiCombo with two columns

    Hi Team How Can I do to I put the items in two columns in a Button with Menu to emulate MultiCombo as example in the URL

    http://examples.ext.net/#/Form/ComboBox/MultiCombo/


    I want to two columns

    This is a example

    Click image for larger version. 

Name:	MutiCombo.png 
Views:	8 
Size:	5.9 KB 
ID:	24138


    Thank you team.

    Regards
    Last edited by Daniil; Aug 18, 2015 at 8:52 AM. Reason: [CLOSED]
  2. #2
    Hi @osef,

    Seems I don't see any way except the example below.

    You will need to change the updateButtonText function to take both the Menus into account.

    Example
    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    
        <script>
            var updateButtonText = function (item, checked) {
                var text = [];
    
                item.parentMenu.items.each(function (item) {
                    if (item.checked) {
                        text.push(item.text);
                    }
                });
    
                if (text.length == 0) {
                    App.Button1.setText("[Select Colors]");
                } else {
                    App.Button1.setText("[" + text.join(",") + "]");
                }
            };
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Button 
                ID="Button1" 
                runat="server" 
                Icon="Rgb" 
                Text="[Select Colors]" 
                Width="200">
                <Menu>
                    <ext:Menu runat="server" Width="200">
                        <Defaults>
                            <ext:Parameter Name="HideOnClick" Value="false" Mode="Raw" />
                        </Defaults>
                        <Items>
                            <ext:Container runat="server">
                                <LayoutConfig>
                                    <ext:HBoxLayoutConfig Align="Stretch" />
                                </LayoutConfig>
                                <Items>
                                    <ext:Menu runat="server" Flex="1" Floating="false">
                                        <Items>
                                            <ext:CheckMenuItem runat="server" Text="Red" CheckHandler="updateButtonText" />
                                            <ext:CheckMenuItem runat="server" Text="Green" CheckHandler="updateButtonText" />
                                            <ext:CheckMenuItem runat="server" Text="Blue" CheckHandler="updateButtonText" />
                                        </Items>
                                    </ext:Menu>
                                    <ext:Menu runat="server" Flex="1" Floating="false">
                                        <Items>
                                            <ext:CheckMenuItem runat="server" Text="Yellow" CheckHandler="updateButtonText" />
                                            <ext:CheckMenuItem runat="server" Text="White" CheckHandler="updateButtonText" />
                                            <ext:CheckMenuItem runat="server" Text="Black" CheckHandler="updateButtonText" />
                                        </Items>
                                    </ext:Menu>
                                </Items>
                            </ext:Container>
                        </Items>                    
                    </ext:Menu>
                </Menu>
            </ext:Button>
        </form>
    </body>
    </html>
    Last edited by Daniil; Aug 13, 2015 at 8:47 AM.
  3. #3
    Thank you, but with the version 2.x, because this is the example with image.

    Click image for larger version. 

Name:	Bug.png 
Views:	5 
Size:	3.8 KB 
ID:	24142

    I have a big aplication,so, I need to do it with 2.x.

    Thank you
  4. #4
    Running the example with the latest Ext.NET v2 from SVN I see this:
    Click image for larger version. 

Name:	v2.JPG 
Views:	5 
Size:	13.2 KB 
ID:	24146

    Please provide your test case.

    By the way, to remove the space on the left please set Plain="true" for the Menu.
    Last edited by Daniil; Aug 13, 2015 at 8:49 AM.

Similar Threads

  1. Replies: 1
    Last Post: Jul 03, 2014, 8:32 AM
  2. MultiCombo and IE8
    By Birgit in forum 2.x Help
    Replies: 1
    Last Post: Dec 07, 2012, 9:15 AM
  3. Replies: 0
    Last Post: Aug 23, 2012, 11:55 PM
  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. Editable MultiCombo
    By eaglemobile in forum Feature Requests
    Replies: 6
    Last Post: Feb 25, 2011, 3:07 PM

Tags for this Thread

Posting Permissions