ASP.NET 3.5 and above only

ASP.NET TreeView - Editing Node Text


  • Editing is disabled for the nodes, 'Libraries' and 'Music'.

  • Libraries
    • Documents
      • My Documents
      • Public Documents
    • Music
      • My Music
      • Public Music
    • Pictures
      • My Pictures
      • Public Pictures
    • Videos
      • My Videos
      • Public Videos


[ASPX]

<obout:Tree ID="VistaTree" AllowNodeEdit="true" OnBeforeNodeEdit="OnClientBeforeNodeEdit"    
    OnNodeEdit="OnClientNodeEdit" CssClass="vista" runat="server">
    <Nodes>
        <obout:Node Text="Libraries" AllowEdit="false" ...>
            <obout:Node Text="Documents" ...>...</obout:Node>
            <obout:Node Text="Music" AllowEdit="false" ...>...</obout:Node>
            ...
        </obout:Node>
    </Nodes>
</obout:Tree>
            
[Javascript]

function OnClientBeforeNodeEdit(sender, args) {
    var chk_conform = document.getElementById("<%=chk_cfm.ClientID %>");
    if (chk_conform.checked) {
        var action = confirm("Are you sure to rename '" + args.text + "'?");
        args.cancel = !action;
    }
}
function OnClientNodeEdit(sender, args) {
    var chk_conform = document.getElementById("<%=chk_cfm.ClientID %>");
    if (chk_conform.checked && args.text != args.newText) {
        var action = confirm("Rename '" + args.text + "' to '" + args.newText + "'?");
        args.cancel = !action;
    }
}
            

"One more thing I would like to share with you guys is, what a great outstanding solutions and very quick response with efficient support. I'm really so inspired with these components and it’s like very superior while working with these components. I'm so impressed and great work. I hope you are shaking presentation in this world :) Thank you once again ALL THE BEST!"

R.B.

Random testimonial   All testimonials