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

radgrid 100% height in splitter trouble

1 Answer 154 Views
Grid
This is a migrated thread and some comments may be shown as answers.
bo
Top achievements
Rank 1
bo asked on 28 Jan 2009, 05:39 PM
I've got 2 pages, each has a radgrid in a splitter set to grow to 100% height.

The grid in the first file grows in height to fill the splitter.  The 2nd one doesn't at all...i can't find the difference to save my life...can someone help me...
This one works fine
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ MasterType VirtualPath="~/Master/BlenderMaster.master" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"
 
    <script type="text/javascript">  
                function ClientResized(sender, eventArgs) 
                {  
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest('ChangePageSize'); 
                } 
    </script> 
 
    <div id="PageTitleHeader"
        <h1> 
            Function Groups 
        </h1> 
    </div> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="rgFunctionGroups"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rgFunctionSpecs" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadSplitter ID="RadSplitter1" Width="100%" Height="95%" runat="server" Orientation="Horizontal"
        <telerik:RadPane ID="gridPane" runat="server" Height="100%" OnClientResized="ClientResized" 
            Scrolling="None"
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
                Width="75px" Transparency="25"
                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
                    style="border: 0;" /> 
            </telerik:RadAjaxLoadingPanel> 
            <telerik:RadGrid ID="rgFunctionGroups" Skin="WebBlue" GridLines="None" runat="server" 
                AllowAutomaticDeletes="False" AllowAutomaticInserts="False" Height="100%" Width="100%" 
                AllowAutomaticUpdates="False" AllowPaging="False" AutoGenerateColumns="False" 
                AllowFilteringByColumn="true" AllowSorting="true"  
                OnNeedDataSource="rgFunctionGroups_NeedDataSource" 
                OnUpdateCommand="rgFunctionGroups_UpdateCommand"  
                OnInsertCommand="rgFunctionGroups_InsertCommand"
                <HeaderContextMenu Skin="WebBlue"
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </HeaderContextMenu> 
                <PagerStyle Mode="Slider" /> 
                <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="FunctionGroupID" 
                    HorizontalAlign="NotSet" AutoGenerateColumns="False" EditMode="InPlace"
                    <Columns> 
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" 
                            HeaderStyle-Width="25" /> 
                        <telerik:GridTemplateColumn DataField="groupname" HeaderText="Group Name" SortExpression="groupname" 
                            UniqueName="groupname" HeaderStyle-Width="20%"
                            <ItemTemplate> 
                                <asp:Label ID="lblGroupName" runat="server" Text='<%# Eval( "groupname") %>' /> 
                            </ItemTemplate> 
                            <EditItemTemplate> 
                                <asp:TextBox ID="txtGroupName" runat="server" Text='<%# Eval( "groupname") %>' Width="95%" /> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 
                        <telerik:GridTemplateColumn DataField="description" HeaderText="Description" SortExpression="description" 
                            UniqueName="description" HeaderStyle-Width="70%"
                            <ItemTemplate> 
                                <asp:Label ID="lblDescription" runat="server" Text='<%# Eval( "description") %>' /> 
                            </ItemTemplate> 
                            <EditItemTemplate> 
                                <asp:TextBox ID="txtDescription" runat="server" Text='<%# Eval( "description") %>' 
                                    Width="95%" /> 
                            </EditItemTemplate> 
                        </telerik:GridTemplateColumn> 
                    </Columns> 
                </MasterTableView> 
                <ClientSettings> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                </ClientSettings> 
                <FilterMenu Skin="WebBlue"
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </FilterMenu> 
            </telerik:RadGrid> 
        </telerik:RadPane> 
    </telerik:RadSplitter> 
</asp:Content> 
 
This one doesn't grow
<%@ Page Language="C#" MasterPageFile="~/Master/BlenderMaster.master" AutoEventWireup="true" 
    CodeFile="FunctionSpecs.aspx.cs" Inherits="DevTools_FunctionSpecs" Title="Function Specifications" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ MasterType VirtualPath="~/Master/BlenderMaster.master" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"
 
    <script type="text/javascript">  
                function ClientResized(sender, eventArgs) 
                {  
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest('ChangePageSize'); 
                } 
    </script> 
 
    <div id="PageTitleHeader"
        <h1> 
            Function Specifications 
        </h1> 
    </div> 
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="rgFunctionSpecs"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="rgFunctionSpecs" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadSplitter ID="RadSplitter1" Width="100%" Height="95%" runat="server" Orientation="Horizontal"
        <telerik:RadPane ID="gridPane" runat="server" Height="100%" OnClientResized="ClientResized" 
            Scrolling="None"
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
                Width="75px" Transparency="25"
                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
                    style="border: 0;" /> 
            </telerik:RadAjaxLoadingPanel> 
            <telerik:RadGrid ID="rgFunctionSpecs" Skin="WebBlue" GridLines="None" runat="server" 
                AllowAutomaticDeletes="False" AllowAutomaticInserts="False" Height="100%" Width="100%"  
                AllowAutomaticUpdates="False" AllowPaging="False" AutoGenerateColumns="False"  
                AllowFilteringByColumn="true" AllowSorting="true" 
                OnNeedDataSource="rgFunctionSpecs_NeedDataSource" 
                OnUpdateCommand="rgFunctionSpecs_UpdateCommand"  
                OnItemDataBound="rgFunctionSpecs_ItemDataBound" 
                > 
                <HeaderContextMenu Skin="WebBlue"
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </HeaderContextMenu> 
                <PagerStyle Mode="Slider" /> 
                <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames="FunctionSpecID" 
                    HorizontalAlign="NotSet" AutoGenerateColumns="False" EditMode="InPlace"
                    <Columns> 
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" 
                            HeaderStyle-Width="25" /> 
                        <telerik:GridDropDownColumn DataField="FunctionGroupId" HeaderText="Function Group" 
                            SortExpression="FunctionGroupId" UniqueName="FunctionGroupId" HeaderStyle-Width="15%" 
                            ListTextField="GroupName" ListValueField="FunctionGroupId" /> 
                        <telerik:GridBoundColumn DataField="displayname" HeaderText="Display Name" SortExpression="displayname" 
                            UniqueName="displayname" HeaderStyle-Width="15%" /> 
                        <telerik:GridBoundColumn DataField="description" HeaderText="Description" SortExpression="description" 
                            UniqueName="description" HeaderStyle-Width="65%" /> 
                        <telerik:GridBoundColumn DataField="exceptions" HeaderText="Exceptions" Display="false" 
                            SortExpression="exceptions" UniqueName="exceptions" /> 
                        <telerik:GridBoundColumn DataField="functionkey" HeaderText="functionkey" Display="false" 
                            SortExpression="functionkey" UniqueName="functionkey" /> 
                        <telerik:GridBoundColumn DataField="requestparams" HeaderText="requestparams" Display="false" 
                            SortExpression="requestparams" UniqueName="requestparams" /> 
                        <telerik:GridBoundColumn DataField="result" HeaderText="result" Display="false" SortExpression="result" 
                            UniqueName="result" /> 
                        <telerik:GridBoundColumn DataField="resultdata" HeaderText="resultdata" Display="false" 
                            SortExpression="resultdata" UniqueName="resultdata" /> 
                        <telerik:GridBoundColumn DataField="url" HeaderText="url" Display="false" SortExpression="url" 
                            UniqueName="url" /> 
                        <telerik:GridCheckBoxColumn DataField="iscompleted" HeaderText="Completed" Display="false" 
                            SortExpression="iscompleted" UniqueName="iscompleted" EditFormColumnIndex="1" /> 
                    </Columns> 
                     
                </MasterTableView> 
                <ClientSettings> 
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                </ClientSettings> 
                <FilterMenu Skin="WebBlue"
                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                </FilterMenu> 
            </telerik:RadGrid> 
        </telerik:RadPane> 
    </telerik:RadSplitter> 
</asp:Content> 
 


1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 28 Jan 2009, 05:43 PM
Hi bo,

Please refer to:

http://www.telerik.com/community/code-library/aspnet-ajax/ajax/how-to-set-100-height-and-random-styles-to-a-radajaxmanager-update-panel.aspx

All the best,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
bo
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or