This is a migrated thread and some comments may be shown as answers.

Grid nested in rad pane, 100% scrollbar

2 Answers 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mihai
Top achievements
Rank 1
Mihai asked on 25 Nov 2010, 02:24 PM
Hello all,

I have the layout below: Because the grid has a RadToolBar on top and Height=100%, a scroll bar appears on the right :(

I want the grid to occupy the all the space below the tool bar. How should I do it?

The same problem I had for the splitter but I tricked with HeightOffset parameter...

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StartPage.aspx.cs" Inherits="StartPage" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        html, body, form
        {
            height: 100%;
            margin: 0px;
            padding: 0px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="ScriptManager" runat="server" />
    <!-- header and menu -->
    <div style="vertical-align: bottom;">
        <div id="header" style="display: block; clear: both;">
            <div style="float: right; padding-bottom: 10px">
                <asp:LoginName ID="LoginName1" runat="server" />
                <asp:LoginStatus ID="LoginStatus1" runat="server" />
            </div>
            <div style="float: left;">
                LOGO</div>
        </div>
        <telerik:RadMenu ID="RadMenuMain" runat="server" EnableRoundedCorners="true" EnableShadows="true"
            Width="100%">
            <Items>
                <telerik:RadMenuItem Text="Test">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
    </div>
    <!-- panes -->
    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%" HeightOffset="60">
        <telerik:RadPane ID="LeftPane" runat="server" Width="200px">
            <!-- tree goes here -->
            <telerik:RadTreeView ID="RadTreeViewLeft" runat="Server">
            </telerik:RadTreeView>
        </telerik:RadPane>
        <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward" />
        <telerik:RadPane ID="EndPane" runat="server">
            <telerik:RadToolBar ID="RadToolBarMain" runat="server" EnableRoundedCorners="true"
                EnableShadows="true" Width="100%">
                <Items>
                    <telerik:RadToolBarButton Text="Create" Value="Create"/>
                </Items>
            </telerik:RadToolBar>
            <telerik:RadGrid ID="RadGridMain" runat="server" AllowMultiRowSelection="true" AllowSorting="True"
                AutoGenerateColumns="false" AllowPaging="true" AllowCustomPaging="true" PageSize="20"               
                Height="100%">
                <FilterMenu runat="server" Enabled="true">
                </FilterMenu>
                <ClientSettings>
                    <Selecting AllowRowSelect="True" />
                    <Resizing AllowResizeToFit="false" AllowColumnResize="true" ShowRowIndicatorColumn="true" />
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                </ClientSettings>               
            </telerik:RadGrid>
        </telerik:RadPane>
    </telerik:RadSplitter>
    </form>
</body>
</html>

Thanks,
Mihai

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 25 Nov 2010, 05:18 PM
Hello Mihai,

In general, 100% high elements should not have siblings, otherwise you must calculate their height on the client. To avoid this, you can place the RadToolBar and RadGrid in two separate RadPanes. Add a new RadSplitter in EndPane.

Best wishes,
Dimo
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Mihai
Top achievements
Rank 1
answered on 02 Dec 2010, 01:14 PM
Thanks Dimo, I have the desired results now.
Tags
Grid
Asked by
Mihai
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Mihai
Top achievements
Rank 1
Share this question
or