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

[Solved] RadGrid alternating row in RadDock

2 Answers 217 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Iron
Iron
Iron
Daniel asked on 20 Apr 2009, 01:20 AM
I've just upgraded to the 2009 Q1 RadControls. When placing a RadGrid inside a RadDock the alternating row color seems to inherit its color from the RadDock. If you apply the 'Black' theme for example to the RadDock the RadGrid alternating rows appear dark grey. Is this easily fixed with a style change to the RadGrid? Is this isolated to the alternating rows?

Daniel

2 Answers, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 1
Iron
Iron
Iron
answered on 20 Apr 2009, 01:22 AM
Sorry, forgot to mention, the target platform is IE6. It works okay in IE7 and FF3 okay.

Daniel
0
Dimo
Telerik team
answered on 22 Apr 2009, 02:15 PM
Hi Daniel,

I don't see any differences in IE6 / IE7 / Firefox on the following test page - both the normal and alternating rows appear as expected.

Can you please provide some more information about the problem and a runnable demo or a code snippet ?

<%@ 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 = 2
        int rowsNum = 6
        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" 
"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>RadControls for ASP.NET AJAX</title> 
</head> 
<body style="background:#000;color:#fff"
<form id="form1" runat="server"
<asp:ScriptManager ID="ScriptManager1" runat="server" /> 
 
<p>RadGrid inside RadDock</p> 
 
<telerik:RadDockLayout ID="RadDockLayout1" runat="server" Skin="Black"
    <telerik:RadDockZone ID="RadDockZone1" runat="server"
        <telerik:RadDock ID="RadDock1" runat="server" Width="400px" Height="300px"
            <ContentTemplate> 
                <telerik:RadGrid 
                    ID="RadGrid1" 
                    runat="server" 
                    Skin="Black" 
                    OnNeedDataSource="RadGrid_NeedDataSource" /> 
            </ContentTemplate> 
        </telerik:RadDock>   
    </telerik:RadDockZone> 
</telerik:RadDockLayout> 
 
<p>RadGrid outside RadDock</p> 
 
<telerik:RadGrid 
    ID="RadGrid2" 
    runat="server" 
    Skin="Black" 
    OnNeedDataSource="RadGrid_NeedDataSource" /> 
 
</form> 
</body> 
</html> 


Kind regards,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Daniel
Top achievements
Rank 1
Iron
Iron
Iron
Dimo
Telerik team
Share this question
or