Hello,
I currently have this problem: After a postback, I want to display/update additional information about the currently selected node.
The problem is the order of the scripts that are generated. At server side I use this call to render the script that should be executed after the postback:
On Client side, this script gets rendered and executed:
As you can see, the _preInitialize gets executed *AFTER* my script - which is - of course - totally wrong order. I need the treeview client side object initialized before my call gets executed, because the $find() call returns null in this case.
How can I achieve this?
Using setTimeout is no option. This would a) delay the user interface update and b) I still can't be sure that the TreeView object is fully initialized when the timeout triggers.
Is there a event that is triggered after a postback where I can be sure that the treeview client side object is fully initialized?
Regards,
Sebastian
I currently have this problem: After a postback, I want to display/update additional information about the currently selected node.
The problem is the order of the scripts that are generated. At server side I use this call to render the script that should be executed after the postback:
ScriptManager.RegisterStartupScript(_updatePanel, _updatePanel.GetType(), "UpdateDetails", "var treeView = $find('" + _navigationTree.ClientID + "'); UpdateDetailDisplay();", true); |
On Client side, this script gets rendered and executed:
var treeView = $find('ctl00_controlArea_ctl01_ctl04_ctl02'); |
UpdateDetailDisplay(); // internally uses treeView.get_selectedNode(); to read data... |
Telerik.Web.UI.RadTreeView._preInitialize("ctl00_controlArea_ctl01_ctl04_ctl02","0"); |
As you can see, the _preInitialize gets executed *AFTER* my script - which is - of course - totally wrong order. I need the treeview client side object initialized before my call gets executed, because the $find() call returns null in this case.
How can I achieve this?
Using setTimeout is no option. This would a) delay the user interface update and b) I still can't be sure that the TreeView object is fully initialized when the timeout triggers.
Is there a event that is triggered after a postback where I can be sure that the treeview client side object is fully initialized?
Regards,
Sebastian