ASPxClientTreeViewNode.SetText(value) Method

Specifies the text, displayed within the node.

Declaration

SetText(value: string): void

Parameters

Name Type Description
value string

A string value that represents the text displayed within the node.

Remarks

Use the SetText method to define the node text on the client side.

Note

The SetText method does not HTML encode the specified text.

Examples

The code example below shows how you can change a node's text on the client side.

<dx:aspxtreeview id="ASPxTreeView1" runat="server" allowselectnode="True" clientinstancename="treeview" DataSourceID="XmlDataSource1">
</dx:aspxtreeview>

<dx:aspxtextbox id="ASPxTextBox1" runat="server" clientinstancename="textbox" width="170px"></dx:aspxtextbox>

<dx:aspxbutton id="ASPxButton1" runat="server" text="Rename Node" AutoPostBack="False">
<ClientSideEvents Click="function(s, e) {treeview.GetSelectedNode().SetText(textbox.GetText());}"></ClientSideEvents>
</dx:aspxbutton>
See Also