Hi there,
I need your help urgently. I have a grid with 2 levels of details, parent and child.
But the column between parent and child are not aligned properly in Firefox 3.
I followed the recommendation from here:
http://www.telerik.com/help/aspnet-ajax/grdaligncolumnsinhierarchy.html
It works well in IE 7 & IE 8.
Does anyone experience this before?
Your response will be appreciated.
I'm using Telerik 2009 Q3 SP1.
Thanks
Sxin
I need your help urgently. I have a grid with 2 levels of details, parent and child.
But the column between parent and child are not aligned properly in Firefox 3.
I followed the recommendation from here:
http://www.telerik.com/help/aspnet-ajax/grdaligncolumnsinhierarchy.html
It works well in IE 7 & IE 8.
Does anyone experience this before?
Your response will be appreciated.
I'm using Telerik 2009 Q3 SP1.
Thanks
Sxin
3 Answers, 1 is accepted
0

First
Top achievements
Rank 1
answered on 03 May 2010, 02:06 PM
After a few hours of trying, this what I found:
In order to make it work in IE:
- The width of the first column in MasterTableView is 250px.
- The width of the first column in DetailTables is 216px.
But the alignment in Firefox 3 is off.
So I tried to adjust it for the Firefox. and I realized in Firefox I don't have to minus 34px (collapse column) for the second level first column.
My question is how to make the grid smart enough to do the alignment?
Thanks,
sxin
In order to make it work in IE:
- The width of the first column in MasterTableView is 250px.
- The width of the first column in DetailTables is 216px.
But the alignment in Firefox 3 is off.
So I tried to adjust it for the Firefox. and I realized in Firefox I don't have to minus 34px (collapse column) for the second level first column.
My question is how to make the grid smart enough to do the alignment?
Thanks,
sxin
0
Accepted
Hi Sxin,
Here is a simple demo, which works in all browsers:
Greetings,
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.
Here is a simple demo, which works in all browsers:
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<
script
runat
=
"server"
>
protected void RadGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
DataTable dt = new DataTable();
DataRow dr;
int colsNum = 4;
int rowsNum = 5;
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
>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
id
=
"Head1"
runat
=
"server"
>
<
meta
http-equiv
=
"content-type"
content
=
"text/html;charset=utf-8"
/>
<
title
>RadControls</
title
>
<
style
type
=
"text/css"
>
.RadGrid td{padding:0}
/* The following is required for pixel-exact alignment in IE7 */
/*.RadGrid .rgMasterTable .rgDetailTable{border-left-width:0}*/
</
style
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
/>
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
Width
=
"800px"
Skin
=
"Office2007"
AutoGenerateColumns
=
"false"
OnNeedDataSource
=
"RadGrid_NeedDataSource"
>
<
MasterTableView
TableLayout
=
"Fixed"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Column1"
HeaderText
=
"Col 1"
/>
<
telerik:GridBoundColumn
DataField
=
"Column2"
HeaderText
=
"Col 2"
HeaderStyle-Width
=
"200px"
/>
<
telerik:GridBoundColumn
DataField
=
"Column3"
HeaderText
=
"Col 3"
HeaderStyle-Width
=
"200px"
/>
</
Columns
>
<
DetailTables
>
<
telerik:GridTableView
Width
=
"100%"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Column1"
HeaderText
=
"Col 1"
/>
<
telerik:GridBoundColumn
DataField
=
"Column2"
HeaderText
=
"Col 2"
HeaderStyle-Width
=
"200px"
/>
<
telerik:GridBoundColumn
DataField
=
"Column3"
HeaderText
=
"Col 3"
HeaderStyle-Width
=
"200px"
/>
</
Columns
>
<
DetailTables
>
<
telerik:GridTableView
Width
=
"100%"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"Column1"
HeaderText
=
"Col 1"
/>
<
telerik:GridBoundColumn
DataField
=
"Column2"
HeaderText
=
"Col 2"
HeaderStyle-Width
=
"200px"
/>
<
telerik:GridBoundColumn
DataField
=
"Column3"
HeaderText
=
"Col 3"
HeaderStyle-Width
=
"200px"
/>
</
Columns
>
</
telerik:GridTableView
>
</
DetailTables
>
</
telerik:GridTableView
>
</
DetailTables
>
</
MasterTableView
>
</
telerik:RadGrid
>
</
form
>
</
body
>
</
html
>
Greetings,
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.
0

First
Top achievements
Rank 1
answered on 11 May 2010, 05:41 AM
Thank you for your help.