Hello,
I am working with a RadTreeView using a node template. It is databound against a datatable.
<
TELERIK:RadTreeView
ID
=
"tvOrgChart"
runat
=
"server"
DataValueField
=
"staffmemberid"
DataTextField
=
"title"
DataFieldID
=
"staffmemberid"
DataFieldParentID
=
"supervisor"
>
<
NodeTemplate
>
<
strong
><%# Eval("casualname") %>,</
strong
> <
em
><%# Eval("title") %></
em
> <
small
>[<%# Eval("staffclassname") %>]</
small
>
</
NodeTemplate
>
</
TELERIK:RadTreeView
>
My initial question was supposed to be how can I enable editing on this tree so that only the "title" attribute is edited. It turns out that by adding DataTextField="title", that this functionality is built in!! Pretty cool!
But I do have a problem. When the edit is complete, the node still displays the original text of the template, without any of the updates to the title field. There is a great Outlook-like example showing how to implement ClientNodeEditStart and ClientNodeEdited to restore a message counter after a rename.I attempted to use this pattern.
I want to get the original displayed text, save it, and, after the edit, replace the old title with the new title. Here is the problem... in the ClientNodeEditStart event, the .get_text() does not actually return the text that is displayed on the node! With DataTextField defined, it returns the value of the specified column. Without a text value defined, it returns "System.Data.DataRowView".
How can I get the HTML that is displayed by the node??
Joel