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

Can't list all data with scrollbar in full screen display?

1 Answer 26 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Elvin Hau
Top achievements
Rank 1
Elvin Hau asked on 25 Jun 2010, 04:00 AM
hi,

I have only one Grid in my form.

I don't want to use paging but to display all data (some 400 data) all at once with scrollbar, and want to maximise the Grid display to full screen height and width. 

However, it never appears in 100% height & 100% width no matter what I do.

Imagine that I have a 19" monitor and the Grid only use up half the screen with scrollbar (rather than full screen with scrollbar) ..

Please help..

Thanks

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" 
    Culture="auto" %> 
 
<%@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
    Namespace="System.Web.UI.WebControls" TagPrefix="asp" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!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>Untitled Page</title> 
    <style type="text/css">  
    </style> 
</head> 
<body style="height:100%">  
    <form id="form1" runat="server" style="height:100%">  
    <asp:ScriptManager runat="server" ID="Manager1">  
    </asp:ScriptManager> 
 
    <telerik:RadGrid ID="RadGrid1" runat="server" Width="95%" ShowStatusBar="true" AutoGenerateColumns="False" 
        PageSize="7" AllowSorting="True" AllowMultiRowSelection="False" AllowPaging="False" Height="100%" 
        OnDetailTableDataBind="RadGrid1_DetailTableDataBind" OnNeedDataSource="RadGrid1_NeedDataSource" 
        OnPreRender="RadGrid1_PreRender" onitemcommand="RadGrid1_ItemCommand">  
        <PagerStyle Mode="NumericPages"></PagerStyle> 
        <MasterTableView Width="100%" DataKeyNames="CustomerID" AllowMultiColumnSorting="True" Name="MasterTable" 
         CommandItemDisplay="Top" HierarchyLoadMode="Client">  
         <CommandItemTemplate>    
            <div align="left">    
              <asp:LinkButton ID="initInsertLinkButton" runat="server" CommandName="InitInsert">Add new    
              </asp:LinkButton>    
              <asp:LinkButton ID="editSelectedLinkButton" runat="server" CommandName="EditSelected">Edit Selected    
              </asp:LinkButton>    
            </div>    
        </CommandItemTemplate>    
 
           
            <ExpandCollapseColumn Visible="True">  
            </ExpandCollapseColumn> 
            <Columns>                 
                <telerik:GridBoundColumn SortExpression="CustomerID" HeaderText="CustomerID" HeaderButtonType="TextButton" 
                    DataField="CustomerID">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="ContactName" HeaderText="Contact Name" HeaderButtonType="TextButton" 
                    DataField="ContactName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn SortExpression="CompanyName" HeaderText="Company" HeaderButtonType="TextButton" 
                    DataField="CompanyName">  
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings> 
            <Selecting AllowRowSelect="True"></Selecting> 
            <ClientEvents OnRowSelected="RowSelected"></ClientEvents> 
            <Scrolling AllowScroll="true" ScrollHeight="100%"  /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    </form> 
</body> 
</html> 
 


1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 25 Jun 2010, 12:30 PM
Hello Elvin,

You are missing a 100% height for the <html> element. It cannot be set inline, so use a separate CSS rule.

Also, ScrollHeight cannot accept percentage values and in this case there is no need to set this property at all.

http://www.telerik.com/community/code-library/aspnet-ajax/grid/setting-100-height-and-resize-on-container-resize-for-grid-with-scrolling-and-static-headers.aspx

http://www.telerik.com/help/aspnet-ajax/height-vs-scrollheight.html

Best wishes,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Elvin Hau
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or