In my application I have replaced controls with this new version of Asp.net for ajax.
There is one RadTreeview on whose BeforeClientClick i had written one script but after changing it to new version, this script is not working.
Below is the code:
<
telerik:RadTreeView ID="tvDetractionTypes" runat="server" DataTextField="Title" DataFieldID="ID"
BeforeClientClick="handleNodeClick" DataValueField="ID" DataFieldParentID="ParentDetractionTypeID"
Skin="Office2007" DataSourceID="dsDetractionTypes" Height="150px" Width="250px"
OnNodeBound="tvDetractionTypes_NodeBound">
</telerik:RadTreeView>
<
script type="text/javascript">
function
handleNodeClick(node)
{
//if this is a parent node, expand it and select the first child
if (node.Parent == null && node.Nodes.length > 0)
{
node.Expand();
node.TreeView.UnSelectAllNodes();
node.Nodes[0].Select();
return false;
}
// Unlock any locked sliders
SliderArrays[0][idxSliderLocked] =
false;
SliderArrays[1][idxSliderLocked] =
false;
SliderArrays[2][idxSliderLocked] =
false;
SliderArrays[3][idxSliderLocked] =
false;
// Make sliders visible
SliderArrays[0][idxSliderDisplay] =
true;
SliderArrays[1][idxSliderDisplay] =
true;
SliderArrays[2][idxSliderDisplay] =
true;
SliderArrays[3][idxSliderDisplay] =
true;
// Redraw the sliders to reflect the new default values
SliderArrays[0][idxSliderDisplayWeight] = node.Attributes[
"DefaultTech"];
SliderArrays[1][idxSliderDisplayWeight] = node.Attributes[
"DefaultEquip"];
SliderArrays[2][idxSliderDisplayWeight] = node.Attributes[
"DefaultPatient"];
SliderArrays[3][idxSliderDisplayWeight] = node.Attributes[
"DefaultProcess"];
SliderDrawTable();
// Change the default DV
// Change the tooltip text
return true;
}
</script>
Can anyone tell which event should be used now..?
and how to get node and its attributes in my above script.
I tried using OnClientClicking but not succeed.
Plese help.
Thanks.