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

Client script changing header row height?

3 Answers 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 23 Jun 2008, 01:50 AM
When the grid first displays (while the page is loading) the header row is about 15px. Once the page finishes loading it looks like some client script runs and adjusts (among other things) the header row to about 30px. How do I stop this behavior? I want the header row to remain in it's "initial" height of 15px.

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 23 Jun 2008, 03:54 PM
Hi Scott,

We have insufficient information regarding your project so please elaborate more and/or prepare a working project in order to give you more straight-to-the-point answer.

In the meantime you could use an approach similar to the one shown below to make sure the header height is as you expected:

in the code-behind
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
    if (e.Item is GridHeaderItem) 
    { 
        e.Item.Height = Unit.Pixel(50); 
    } 

in the aspx
<HeaderStyle Height="100px" /> 

Kind regards,
Daniel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Scott
Top achievements
Rank 1
answered on 23 Jun 2008, 10:01 PM

After a few more hours of trouble-shooting, I've narrowed it down to the RadFormDecorator. The page below looks fine until you sort one of the columns, then the header row height inexplicably grows:

<%@ Page Language="C#" %> 
<%@ 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">  
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> 
<title>RadGrid for ASP.NET AJAX</title> 
<style type="text/css">  
 
html  
{  
    overflow: hidden;  
}  
 
html,  
body,  
form  
{  
    margin:0;  
    height:100%;  
}  
 
</style> 
</head> 
<body> 
<form id="form1" runat="server">  
<asp:ScriptManager ID="ScriptManager1" runat="server" /> 
 
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" Skin="Office2007" /> 
 
<telerik:RadGrid  
    ID="RadGrid1" 
    runat="server" 
    DataSourceID="XmlDataSource1" 
    AllowPaging="false" 
    AllowSorting="true" 
    Skin="Vista" 
    PageSize="40" 
    Width="100%" 
    Height="100%" 
    style="border:0;outline:none" 
    > 
   <MasterTableView TableLayout="Fixed" /> 
   <ClientSettings> 
        <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
    </ClientSettings> 
</telerik:RadGrid> 
 
 
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/datasource.xml" /> 
 
 
</form> 
</body> 
</html> 
 

0
Konstantin Petkov
Telerik team
answered on 24 Jun 2008, 06:45 AM
Hi Scott,

We've improved the support of RadFormDecorator in RadGrid with the latest version labeled 2008.1.619 released last week. Please, give it a go and let us know how it works for you.

Regards,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Scott
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Scott
Top achievements
Rank 1
Konstantin Petkov
Telerik team
Share this question
or