ASTreeView has been updated to version 1.5.3. In the new version, developer can have more flexibility to control Add/Edit/Delete/DragDrop with customized javascript handler.
In addition, from 1.5.3, two versions of ASTreeView will be available, one for .Net Framework 2.0(build with Ajax Extension 1.0), one for .Net Framework 3.5(build with Ajax Extension 3.5 ). Samples also will be available in two version, one for VS2005 and one for VS2008.
New Features in 1.5.3:
1. Supports customized javascript handler
For example, if the developer wants to cancel add node action if server returns some specified condition. He can":
(a) Set EnableOnNodeAddedScriptReturn="true"
(b) Set OnNodeAddedScript="addedHandler(elem)"
(c) Write the addedHandler:
function addedHandler( elem ){ var message = ''; var result = true; var aTag = elem.getElementsByTagName('A')[0]; if( aTag.getAttribute('addfailed') == 'true' ){ alert( aTag.innerHTML ); return false; } else{ message = (">>add completed. [Node]" + elem.getAttribute("treeNodeValue") + "<br />" ); } document.getElementById("<%=divConsole.ClientID %>").innerHTML += message; return result; }
in this case, when the server side return the node with “addfailed” in the anchor, the astreeview will cancel the add action.
Same approach can be applied on Edit, Delete and DragDrop.
Some screenshots:
View Live Demo
2. Improved CSS for ASTreeView
CSS of ASTreeView has been update to align better between node icon and node text.
3. Improved ViewState Management
ViewState of ASTreeView has been move from hidden to viewstate. This can improve the performance of astreeview.
4. Strong Named Assembly
From 1.5.3 the ASTreeView.dll will be signed strong name.