I have setup my flytreeview inside an update panel to postback on node selection. During the postback on the server, I'm sending back the node I want to be selected on the client. So, I find the node and call its select function on the client. However, if this node is not the node that is currently selected, it will postback to the server again. Is there a way to disable the postback functionality when selecting a node on the client?
Here's the client code I'm using:
var _treeview;
function initializeTreeView(sender)
{
_treeview = sender;
}
// handler for update panel's endRequest event
function endRequest(sender, args)
{
// get the selected node id from the response
var newPageValue = args.get_dataItems().ProposalTree
if(typeof(newPageValue) == "string")
{
var node = _treeview.findByValue(newPageValue);
if(node)
{
// THIS WILL CAUSE A POSTBACK IF THE CURRENTLY SELECTED NODE
// DOES NOT EQUAL THIS NODE.
node.select();
}
else
{
alert("Unable to find the node by id. ID: " + newPageValue);
}
}
else
{
alert("Unable to retrieve the page id from the response.");
}
.
.
.
Also, the reason I do not set the selected node on the server is because of the size of html sent back for the flytreeview. My response size is doubled if I programatically update the flytreeview's update panel.