[CLOSED] Multiselect with BorderLayout

  1. #1

    [CLOSED] Multiselect with BorderLayout

    Hi,

    This is a minized case of my issue that works right between rev.4283 and rev.4360 of Ext.NET 2.1

    TEST CASE
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>IconCombo - Ext.NET Examples</title>
    </head>
    <body>
        <form runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Button runat="server" Text="Test">
            <Listeners>
                <Click Handler="lstValores.store.add({ text: 'sample', value: 0 });" />
            </Listeners>
        </ext:Button>
        <ext:Panel runat="server" Layout="BorderLayout" Height="500" Width="500">
            <Items>
                <ext:MultiSelect ID="lstValores" runat="server" MultiSelect="true" FieldLabel="My Title"
                    Width="250" Height="145" LabelAlign="Top" Region="Center">
                    <Store>
                        <ext:Store runat="server" ShowWarningOnFailure="false" RemoteSort="false">
                            <Model>
                                <ext:Model runat="server">
                                    <Fields>
                                        <ext:ModelField Name="value" Type="String" />
                                        <ext:ModelField Name="text" Type="String" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                            <Sorters>
                                <ext:DataSorter Property="text" Direction="ASC" />
                            </Sorters>
                        </ext:Store>
                    </Store>
                </ext:MultiSelect>
            </Items>
        </ext:Panel>
        </form>
    </body>
    </html>
    As you see multiselect isn't expanded and grows when an item is inserted.
    It could be a mistake of my design that now which all fixes doesn't work.

    Tested in rev 4377.

    Thanks
    Last edited by Daniil; Oct 02, 2012 at 10:17 AM. Reason: [CLOSED]
  2. #2
    Hi @softmachine2011,

    Thank you for the report. We will investigate.

    By the way, you should not set Width and Height for the component which is under FitLayout control.
  3. #3
    The problem appears to be here:
     LabelAlign="Top"
    We will investigate.

    For now we can suggest the following solution.

    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>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
    
        <ext:Button runat="server" Text="Test">
            <Listeners>
                <Click Handler="App.MultiSelect1.store.add({ text: 'sample', value: 0 });" />
            </Listeners>
        </ext:Button>
    
        <ext:Panel runat="server" Layout="BorderLayout" Height="500" Width="500">
            <Items>
                <ext:Container runat="server" Region="Center" StyleSpec="background:white;">
                    <LayoutConfig>
                        <ext:VBoxLayoutConfig Align="Stretch" />
                    </LayoutConfig>
                    <Items>
                        <ext:DisplayField runat="server" FieldLabel="My Title" />
                        <ext:MultiSelect
                            ID="MultiSelect1" 
                            runat="server" 
                            Flex="1">
                            <Store>
                                <ext:Store runat="server">
                                    <Model>
                                        <ext:Model runat="server">
                                            <Fields>
                                                <ext:ModelField Name="value" Type="String" />
                                                <ext:ModelField Name="text" Type="String" />
                                            </Fields>
                                        </ext:Model>
                                    </Model>
                                </ext:Store>
                            </Store>
                        </ext:MultiSelect>
                    </Items>
                </ext:Container>
            </Items>
        </ext:Panel>
    </body>
    </html>
  4. #4
    Quote Originally Posted by Daniil View Post
    The problem appears to be here:
     LabelAlign="Top"
    Incredible, this is the last property where I look to resolve it.

    Thanks with displayfield works right.
  5. #5
    The issue has been fixed in SVN. Now it should work well with Top LabelAlign.
  6. #6
    Ok, thanks

    Right now the fix work and I don't change it because our QA team must retest it.

Similar Threads

  1. Replies: 4
    Last Post: May 09, 2012, 9:24 PM
  2. Replies: 0
    Last Post: Apr 19, 2012, 3:52 PM
  3. Replies: 4
    Last Post: Feb 20, 2012, 11:14 AM
  4. Replies: 0
    Last Post: Mar 09, 2010, 7:28 AM
  5. [CLOSED] JavaScript error with MultiSelect inside BorderLayout and TabPanel
    By martin.mosimann in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 25, 2009, 1:03 PM

Tags for this Thread

Posting Permissions