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

[Solved] Header height problem when sorting

1 Answer 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 27 Aug 2009, 02:40 PM
Hello,

We have a grid (Office 2007 theme) with many small columns. When one of these columns is sorted, IE increases the header height and shows the icon below the text. We want to force the header to always have the same height though.

overflow and text-overflow work for the text, but not for the image.
This happens only in IE. Firefox and Chrome correctly hide the overflowing image.

Any thoughts?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 31 Aug 2009, 10:01 AM
Hello Jan,

Have you disabled text wrapping in the RadGrid header?


<%@ Page Language="C#" %> 
<%@ Import Namespace="System.Data" %> 
<%@ 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"> 
 
<script runat="server"
 
protected void RadGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) 
    DataTable dt = new DataTable(); 
    DataRow dr; 
    int colsNum = 10
    int rowsNum = 10
    string colName = "Column"
 
    for (int j = 1; j <= colsNum; j++) 
    { 
        dt.Columns.Add(String.Format("{0}{1}", colName, j)); 
    } 
 
    for (int i = 1; i <= rowsNum; i++) 
    { 
        dr = dt.NewRow(); 
 
        for (int k = 1; k <= colsNum; k++) 
        { 
            dr[String.Format("{0}{1}", colName, k)] = String.Format("{0}{1} Row{2}", colName, k, i); 
        } 
        dt.Rows.Add(dr); 
    } 
 
    (sender as RadGrid).DataSource = dt
 
</script> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"
<meta http-equiv="content-type" content="text/html;charset=utf-8" /> 
<title>RadControls for ASP.NET AJAX</title> 
</head> 
<body> 
<form id="form1" runat="server"
<asp:ScriptManager ID="ScriptManager1" runat="server" /> 
 
<telerik:RadGrid 
    ID="RadGrid1" 
    runat="server" 
    Skin="Office2007" 
    Width="600px" 
    AllowSorting="true" 
    OnNeedDataSource="RadGrid_NeedDataSource"
    <MasterTableView> 
        <HeaderStyle Wrap="false" /> 
        <%--<ItemStyle Wrap="false" />--%> 
        <%--<AlternatingItemStyle Wrap="false" />--%> 
    </MasterTableView> 
    <ClientSettings> 
        <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
    </ClientSettings> 
</telerik:RadGrid> 
 
</form> 
</body> 
</html> 



Best wishes,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Jan
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or