[CLOSED] How to determing the grid panel is showing vertical scroll bar in client and server side?

  1. #1

    [CLOSED] How to determing the grid panel is showing vertical scroll bar in client and server side?

    I have a gridpanel in a normal panel.
    I have to set the fix number for the height, does it auto set the height based on the row numbers?
    If I can't, could I know where the gridpanel is showing vertical scroll bar so that I can increase the height when the gridpanel showing?

    Thank you
    Last edited by Daniil; Mar 15, 2012 at 9:52 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Quote Originally Posted by leon_tang View Post
    I have to set the fix number for the height, does it auto set the height based on the row numbers?
    No, there is no such functionality.

    Quote Originally Posted by leon_tang View Post
    If I can't, could I know where the gridpanel is showing vertical scroll bar so that I can increase the height when the gridpanel showing?
    Not sure, there is a simple way to determine it.

    Did you try AutoHeight="true" functionality?
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,



    No, there is no such functionality.



    Not sure, there is a simple way to determine it.

    Did you try AutoHeight="true" functionality?
    Yes, I try. If I set the AutoHeight="true", the gridpanel will never show.
    Actually, I don't know whether there is a example for AutoHeight in Panel or GridPanel.
  4. #4
    Well, here is the example.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.GridPanel1.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] { "test1", "test2", "test3" },
                    new object[] { "test4", "test5", "test6" },
                    new object[] { "test7", "test8", "test9" },
                };
                store.DataBind();
            }
        }
    </script>
    
    <!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>
        <ext:ResourceManager runat="server" />
        <ext:GridPanel ID="GridPanel1" runat="server" AutoHeight="true">
            <Store>
                <ext:Store runat="server">
                    <Reader>
                        <ext:ArrayReader>
                            <Fields>
                                <ext:RecordField Name="test1" />
                                <ext:RecordField Name="test2" />
                                <ext:RecordField Name="test3" />
                            </Fields>
                        </ext:ArrayReader>
                    </Reader>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column Header="Test1" DataIndex="test1" />
                    <ext:Column Header="Test2" DataIndex="test2" />
                    <ext:Column Header="Test3" DataIndex="test3" />
                </Columns>
            </ColumnModel>
        </ext:GridPanel>
    </body>
    </html>
  5. #5
    Quote Originally Posted by Daniil View Post
    Well, here is the example.

    Example
    <%@ Page Language="C#" %>
     
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.GridPanel1.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] { "test1", "test2", "test3" },
                    new object[] { "test4", "test5", "test6" },
                    new object[] { "test7", "test8", "test9" },
                };
                store.DataBind();
            }
        }
    </script>
    
    <!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>
        <ext:ResourceManager runat="server" />
        <ext:GridPanel ID="GridPanel1" runat="server" AutoHeight="true">
            <Store>
                <ext:Store runat="server">
                    <Reader>
                        <ext:ArrayReader>
                            <Fields>
                                <ext:RecordField Name="test1" />
                                <ext:RecordField Name="test2" />
                                <ext:RecordField Name="test3" />
                            </Fields>
                        </ext:ArrayReader>
                    </Reader>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column Header="Test1" DataIndex="test1" />
                    <ext:Column Header="Test2" DataIndex="test2" />
                    <ext:Column Header="Test3" DataIndex="test3" />
                </Columns>
            </ColumnModel>
        </ext:GridPanel>
    </body>
    </html>
    I see. Does that mean "AutoHeight" doen't work with Ext.Net layout?
  6. #6
    That's right, any Layouts which manage Height (FitLayout, VBoxLayout, etc.) break AutoHeight="true" or vice versa.
  7. #7
    Quote Originally Posted by Daniil View Post
    That's right, any Layouts which manage Height (FitLayout, VBoxLayout, etc.) break AutoHeight="true" or vice versa.
    I see. That make sense now. Thank you

Similar Threads

  1. [CLOSED] Showing indicatorIcon client side...
    By tlfdesarrollo in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 20, 2012, 9:39 AM
  2. Replies: 3
    Last Post: Dec 26, 2011, 1:32 PM
  3. Replies: 1
    Last Post: Dec 01, 2010, 5:14 PM
  4. Replies: 4
    Last Post: Mar 19, 2010, 11:35 AM
  5. Replies: 6
    Last Post: Sep 01, 2009, 1:06 PM

Posting Permissions