When a user drops a node on a webtree, I would like to display options to the user before an ajax call is made to update the tree.
var x = 100000000000000
I've tried to use setTimeout("doSomething()", x). So that it will wait, and then I'd update the time to 0 later once the user made a choice, but no. It seems that an event is triggering a postback before anything can happen.
I don't know what to do to ask the ajax call to wait until further interaction from the user. Any suggestions?
Maybe you can try something along the lines of using the client-side Drop event placing your confirm question (options dialog) there? This way, you can just return false from the function to cancel the event and/or try setting the client-side treeview CancelPosBack property to true, e.g.
<ignav:UltraWebTree ID="UltraWebTree1" runat="server" AllowDrag ="true" AllowDrop="true"> <ClientSideEvents Drop="dropHandler" /> <Nodes> ... </Nodes> </ignav:UltraWebTree>
You can check out the Tree drag and drop sample in the IG Samples browser, where an approach similar to this is used:
http://samples.infragistics.com/2007.3/webfeaturebrowser/default.htm
If this does not help, maybe you can send more information on the treeview setup you are having, where are you running your custom javascript code, etc. This will surely provide additional clues.