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

How do you change node height on the Client Side?

1 Answer 96 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Pat Huesers
Top achievements
Rank 1
Pat Huesers asked on 30 Sep 2009, 03:58 PM
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';
}
}

1 Answer, 1 is accepted

Sort by
0
Pat Huesers
Top achievements
Rank 1
answered on 30 Sep 2009, 04:01 PM
Was a simple coding error.

currNode.set_cssClass=

"addPartsNodePartInfoShown";

Should have been

 

currNode.set_cssClass(

"addPartsNodePartInfoShown");

 

Tags
TreeView
Asked by
Pat Huesers
Top achievements
Rank 1
Answers by
Pat Huesers
Top achievements
Rank 1
Share this question
or