dynamic change color

2 posts, 0 answers
  1. Michele
    Michele avatar
    31 posts
    Member since:
    Jun 2011

    Posted 29 Jul 2013 Link to this post

    I have a problem, I would like to change the font color dynamically:

    <telerik:RadSiteMap ID="BreadCrumbSiteMap" runat="server" DataTextField="Text"


    <DefaultLevelSettings ListLayout-RepeatDirection="Horizontal" SeparatorText="/" Layout="Flow" />

    </telerik:RadSiteMap >

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

         BreadCrumbSiteMap.Style.Add("color", "#000000")
    End Sub

     not  Work
    how can I do?
  2. Kate
    Kate avatar
    1898 posts

    Posted 30 Jul 2013 Link to this post

    Hello Michele,

    I noticed that you also send us a support ticket regarding the same issue. I will paste the answer that I provided in the ticket so that anyone else interested in the solution can refer to it:

    You can find the specific node of the RadSiteMap control and set the CssClass property to any css class. Below you can find an example on how to achieve this. You will also need to add the following css class selector so that the changes can take effect:

    code behind:

    //finds the first child o fthe first root node
            RadSiteMap1.Nodes[0].Nodes[0].CssClass = "new";

    div.RadSiteMap .rsmTwoLevels .rsmLevel1 .rsmItem.new {
               /*here you can set the desired font-size and/or color, it applies only for the first level of nodes*/

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top