Layout within Panel

  1. #1

    Layout within Panel

    <script type="text/javascript" language="javascript"> 
      var renderColumns = function(grid) {
            grid.getView().el.select('.x-grid3-header').setStyle('display', 'none');
        }
    </script>
    
    
    <ext:Panel runat="server" Border="true">
        <Items>
            <ext:Container Layout="HBoxLayout" runat="server">
                <Items>
                    <ext:DisplayField runat="server" Text="List of documents" />
                    <ext:Button runat="server" Text="Upload" ID="btnChoose">
                        <Listeners>
                            <Click Handler="#{wndUploadFile}.show()"></Click>
                        </Listeners>
                    </ext:Button>
                </Items>
            </ext:Container>
            <ext:GridPanel ID="egrAttachments" runat="server" AutoWidth="true" Header="false">
                 <%-- ---------------------   --%>
                <Listeners>
                    <Render Fn="renderColumns"></Render>
                </Listeners>
            </ext:GridPanel>
        </Items>
    </ext:Panel>
    My questions are

    1) How can I align the button "btnChoose" to the right of Panel? If I set the property Cls="float-right" of this button and define the class .float-right as float:right, it doesn't make any effect.

    2)I use the function "renderColumn" to hide grid headers. Is this the right way of doing it? If it's not is there any way to do it?
  2. #2
    Hi,

    Quote Originally Posted by AlexMaslakov View Post
    1) How can I align the button "btnChoose" to the right of Panel? If I set the property Cls="float-right" of this button and define the class .float-right as float:right, it doesn't make any effect.
    Please set up:
    <ext:BoxComponent runat="server" Flex="1">
    before the button.

    Quote Originally Posted by AlexMaslakov View Post
    2)I use the function "renderColumn" to hide grid headers. Is this the right way of doing it? If it's not is there any way to do it?
    Please start a new forum thread, keeping one issue per one thread.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,
    Please set up:
    <ext:BoxComponent runat="server" Flex="1">
    before the button.
    It's not what I need. The button displays on the next line now.
  4. #4
    I was unable reproduce. Here is my test case.

    Example

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Panel runat="server">
                <Items>
                    <ext:Container Layout="HBoxLayout" runat="server">
                        <Items>
                            <ext:BoxComponent runat="server" Flex="1" />
                            <ext:DisplayField runat="server" Text="List of documents" />
                            <ext:Button runat="server" Text="Upload" />
                        </Items>
                    </ext:Container>
                </Items>
            </ext:Panel>
        </form>
    </body>
    </html>
    But, generally speaking, I think the issue can be reproduced, because height and width should be specified for a container with HBoxLayout.

Similar Threads

  1. [CLOSED] Ext.Net panel layout config...
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 18, 2012, 11:01 AM
  2. [CLOSED] force do layout for all panel
    By nhg_itd in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Dec 01, 2011, 9:35 AM
  3. panel layout help
    By norphos in forum 1.x Help
    Replies: 1
    Last Post: May 30, 2011, 6:55 AM
  4. Panel, Flow (?) Layout
    By wdk in forum 1.x Help
    Replies: 3
    Last Post: May 27, 2011, 11:00 AM
  5. [CLOSED] [1.0] fit panel layout
    By PoloTheMonk in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Feb 23, 2010, 3:57 AM

Posting Permissions