Treeview Styling

Discussion in 'ASP .Net' started by Mike Collins, Jun 27, 2008.

  1. Mike Collins

    Mike Collins Guest

    I have six different treeview controls on my page. When selecting a different
    tree I would like the previous tree's node to change its color back to the
    unselected color but what I have tried does not seem to work. I am not seeing
    any changes to the background color of the node in the previous tree. Can
    someone help me with how to do this?
     
    Mike Collins, Jun 27, 2008
    #1
    1. Advertising

  2. Mike Collins

    Munna Guest

    On Jun 27, 10:21 pm, Mike Collins
    <> wrote:
    > I have six different treeview controls on my page. When selecting a different
    > tree I would like the previous tree's node to change its color back to the
    > unselected color but what I have tried does not seem to work. I am not seeing
    > any changes to the background color of the node in the previous tree. Can
    > someone help me with how to do this?


    Hi Mike

    when you select the other trees node does it cause the page to post
    back to the server
    you all client side effect.?

    if it post back to server you can change the previews trees node to
    unselected on server...
    a little code what you have tried would be appreciated ....

    Best of luck

    Munna
    www.munna.shatkotha.com
    www.munna.shatkotha.com/blog
    www.shatkotha.com
     
    Munna, Jun 28, 2008
    #2
    1. Advertising

  3. Mike Collins

    Mike Collins Guest

    Thanks for the reply. Below is what I have tried and it now works for
    de-selecting the previous node, server side. The other thing I am trying to
    get to work is the actual styling of the previous node. When a node is
    selected, it is yellow, set in design time property. I am trying to change
    the color back to its unselected color, but the code below is not changing it
    at all. Just the de-selecting part is working.

    string cssStyle = "color: #FFFFFF; background: none;
    font-size:12pt;font-weight:bold;";
    tvAccountSetup.SelectedNodeStyle.CssClass = cssStyle;

    if (tvAccountSetup.SelectedNode != null)
    tvAccountSetup.SelectedNode.Selected = false;


    "Munna" wrote:

    > On Jun 27, 10:21 pm, Mike Collins
    > <> wrote:
    > > I have six different treeview controls on my page. When selecting a different
    > > tree I would like the previous tree's node to change its color back to the
    > > unselected color but what I have tried does not seem to work. I am not seeing
    > > any changes to the background color of the node in the previous tree. Can
    > > someone help me with how to do this?

    >
    > Hi Mike
    >
    > when you select the other trees node does it cause the page to post
    > back to the server
    > you all client side effect.?
    >
    > if it post back to server you can change the previews trees node to
    > unselected on server...
    > a little code what you have tried would be appreciated ....
    >
    > Best of luck
    >
    > Munna
    > www.munna.shatkotha.com
    > www.munna.shatkotha.com/blog
    > www.shatkotha.com
    >
     
    Mike Collins, Jun 30, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roshawn

    Styling a control

    Roshawn, Aug 20, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    369
    clintonG
    Aug 21, 2004
  2. =?Utf-8?B?Y2RiaWdncw==?=
    Replies:
    0
    Views:
    381
    =?Utf-8?B?Y2RiaWdncw==?=
    Mar 12, 2006
  3. ={ Advocated }=

    Styling a table

    ={ Advocated }=, Sep 15, 2003, in forum: HTML
    Replies:
    17
    Views:
    682
    ={ Advocated }=
    Sep 16, 2003
  4. Sylvie
    Replies:
    0
    Views:
    437
    Sylvie
    Oct 10, 2007
  5. Ian

    Treeview styling woes

    Ian, Mar 4, 2010, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    1,079
Loading...

Share This Page