How do you change node height on the Client Side?

2 posts, 0 answers
  1. Pat Huesers
    Pat Huesers avatar
    20 posts
    Member since:
    Jan 2008

    Posted 30 Sep 2009 Link to this post

    I have a treeview (2008 Q3) and I am trying to change the node height ont he client side.   I did nto see a method for doing this so I am just trying to apply a new CSS class to change the height.   It is not working though, so what am I doing wrong?

    Here is the CSS

    .addPartsNode
    {
    width: 100%;
    height: 20px;
    vertical-align :top;
    padding-top: 0px;
    }
    .addPartsNodePartInfoShown
    {
    width: 100%;
    height: 40px !Important;
    vertical-align :top;
    padding-top: 0px;
    }

    All nodes are set to addPartsNode style to start. 

    Then I use this JS to change the css class for the node. The var currNode is the Current Treeview Node as set by a mouseover function.

    if (currNode != null) {
    document.body.style.cursor = 'wait';
    var element = currNode.get_element();
    var lblStock = $telerik.findElement(element, "lblInStock");
    if (lblStock.style.visibility == "hidden")
    {
    lblStock.innerText="1";
    var tblPartInfo = $telerik.findElement(element, "tblPartInfo");
    tblPartInfo.style.visibility = "visible";
    var tbPartInfo = $telerik.findElement(element, "tbPartNotes");
    tbPartInfo.style.visibility = "visible";


    currNode.set_cssClass="addPartsNodePartInfoShown"
    }
    else
    {
    lblStock.innerText=parseFloat(lblStock.innerText)+1;
    }
    lblStock.style.visibility = "visible";
    document.body.style.cursor = 'default';
    }
    }
  2. Pat Huesers
    Pat Huesers avatar
    20 posts
    Member since:
    Jan 2008

    Posted 30 Sep 2009 Link to this post

    Was a simple coding error.

    currNode.set_cssClass=

    "addPartsNodePartInfoShown";

    Should have been

     

    currNode.set_cssClass(

    "addPartsNodePartInfoShown");

     

Back to Top