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

Scrollbar

1 Answer 19 Views
Grid
This is a migrated thread and some comments may be shown as answers.
dingen
Top achievements
Rank 1
dingen asked on 09 Mar 2010, 03:25 AM
Hi

how can i make the grid spread over the whole page instead of just half?

thanks

D

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="scrollbar.aspx.vb" Inherits="scrollbar" %> 
 
<%@ 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></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
    </div> 
    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None">  
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="ProductID" DataSourceID="SqlDataSource1">  
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridBoundColumn DataField="ProductID" DataType="System.Int32" HeaderText="ProductID" 
                    ReadOnly="True" SortExpression="ProductID" UniqueName="ProductID">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" 
                    UniqueName="ProductName">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="SupplierID" DataType="System.Int32" HeaderText="SupplierID" 
                    SortExpression="SupplierID" UniqueName="SupplierID">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="CategoryID" DataType="System.Int32" HeaderText="CategoryID" 
                    SortExpression="CategoryID" UniqueName="CategoryID">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="QuantityPerUnit" HeaderText="QuantityPerUnit" 
                    SortExpression="QuantityPerUnit" UniqueName="QuantityPerUnit">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="UnitPrice" DataType="System.Decimal" HeaderText="UnitPrice" 
                    SortExpression="UnitPrice" UniqueName="UnitPrice">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="UnitsInStock" DataType="System.Int16" HeaderText="UnitsInStock" 
                    SortExpression="UnitsInStock" UniqueName="UnitsInStock">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="UnitsOnOrder" DataType="System.Int16" HeaderText="UnitsOnOrder" 
                    SortExpression="UnitsOnOrder" UniqueName="UnitsOnOrder">  
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="ReorderLevel" DataType="System.Int16" HeaderText="ReorderLevel" 
                    SortExpression="ReorderLevel" UniqueName="ReorderLevel">  
                </telerik:GridBoundColumn> 
                <telerik:GridCheckBoxColumn DataField="Discontinued" DataType="System.Boolean" HeaderText="Discontinued" 
                    SortExpression="Discontinued" UniqueName="Discontinued">  
                </telerik:GridCheckBoxColumn> 
                <telerik:GridBoundColumn DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName" 
                    UniqueName="CategoryName">  
                </telerik:GridBoundColumn> 
            </Columns> 
        </MasterTableView> 
        <ClientSettings> 
            <Scrolling AllowScroll="True" /> 
        </ClientSettings> 
    </telerik:RadGrid> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=local;Initial Catalog=Northwind;Integrated Security=True" 
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [Alphabetical list of products]">  
    </asp:SqlDataSource> 
    </form> 
</body> 
</html> 
 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 09 Mar 2010, 10:07 AM
Hi Dingen,

Please refer to:

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

(You are not using static headers, but the approach is the same).

If RadGrid is ajaxified, you will also need to apply 100% height to its update panel. Here is how to do that:

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


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
dingen
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or