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

raddock with css

1 Answer 26 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Farshad heidary
Top achievements
Rank 1
Farshad heidary asked on 29 May 2010, 09:40 AM
hi guys

i save content page in database and wanna add it to RadDock
for example i save this code in database :
string str="<div style="background-color: Red; color: black;">
This is a sample text</div>";
dock.Text=str;


i want to se backround red and font cloro is black

but i cant.

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 02 Jun 2010, 06:15 PM
Hi Farshad,

I tried the following code, and the background color is applied and the fore color too. I attached a screenshot showing this.

<%@ 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">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
        </Scripts>
    </asp:ScriptManager>
    <div>
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
            <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="300px" Width="300px">
                <telerik:RadDock ID="RadDock1" runat="server" Title="RadDock-Title" Width="300px">
                     
                </telerik:RadDock>
            </telerik:RadDockZone>
        </telerik:RadDockLayout>
    </div>
    </form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Web.Caching;
 
public partial class Default_Dock : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string str = "<div style='background-color: Red; color: black;'>This is a sample text</div>";
        RadDock1.Text = str;
    }
}

Could you please give us more information about the issue?

Kind regards,
Pero
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
Dock
Asked by
Farshad heidary
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or