Hi Everyone,
I have a very complicated solution with different controls etc.. so it is very hard for me to post any example code.
I am current experiencing the following problem. I have a web tree which is populated on the server side during page load.
I am also using the load on demand manual smart call backs which i use to add more nodes to the tree when they are expanded without postbacks. This all works fine. the loading text is displayed while my tree is populated etc.... then i see my nodes in the tree after.
The problem i am experiencing is after the nodes have been added the node click event is not fired for those particular nodes (however i see a post back occurs). I set a breakpoint in my code which should be hit and it is not. This only occurs with the nodes that have been added during the load on demand process. The nodes which were added on page load can still be clicked and the event is fired. My breakpoint in the code is hit.
Has anybody had a similar issue? Any help or advice would be much appreciated.
Best regards
Andrew
Hello Andrew,
Yes, I think I know what is going on. The problem is described in details in the following KB article:
PRB:State of new nodes is lost when using ManualSmartCallbacks for WebTree
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=9685
Basically, any postback operations like NodeClick will not play nicely with ManualSmartCallBack, since they have been added on the client and their state does not exist on the server. This is one of the limitations of the ManualSmartCallBack mode. Luckily, there are other modes that support that - please, check out the article for detailed information on what are the pros and cons of each specific callback mode for the treeview.
Hi Rumen,
Thanks for your speedy reply, it is much appreciated.
I read the article which you sent and I understand the problem.
However what is not clear is how i can achieve adding more nodes to a tree on the server side without performing postbacks. I really need the on node click event, this is an important part of my application. However i really like the functionality of the ManualSmartCallBacks where the tree displays "loading" then more nodes are added.
I have tried all different types of load on demand, manual, automatic, automaticsmartcallback, however the only one with my desired effect is manual smart call back which then prevents me using the node click event. Unless i have programmed something incorrectly. Is it only possible to have this "loading" displayed with no post backs using the manualsmartcallback?
I know i could achieve this with a WARP panel but i am a bit reluctant to does this at the moment.
Once again thanks in advance for any further information
Thanks for the follow-up. I do understand your scenario and it makes perfect sense, it is just the currently these are the limitations of the modes and short term we will not be able to implement the "loading.." functionality for all modes.
WARP panel does support that (it support custom "loading..." animations that can be templated/customized), so a treeview with automatic callbacks inside WARP will probably fit your case. If you have your reasons for not using it, I am afraid the only way to go would be to use the client side events of the treeview and code your custom animations (e.g. in BeforeNodeClick display a div, then remove it).
Thanks for the information so quickly. I will look in to the WARP panel approach. I may also be able to pass the information using hidden fields some how but i need to investigate this further.
One last question, are there any plans to implement this in future releases? Is there a feature request currently logged?
I am currently using 7.1 but plan to update my application to 8.x very soon. I understand that there also this restriction in the lastest release?
I wish you a nice day
I believe the best way to go in this case it to use our DevCenter Request a Feature functionality:
https://devcenter.infragistics.com/Protected/RequestFeature.aspx
This way, you will have official tracking and information of what happens to your feature suggestion. Our PMs take customer requests very seriously and actually most of our TODO list is based on that.
Thanks for sharing your great solution with the Infragistics Community, Andrew - it certainly sounds like a great approach. I am more than sure that this thread will be a valuble resource for many many developers. Glad I was able to add one tiny bit to it.
Thanks again.
just for anyone who is having similar issues:
It looks like i have been able to solve this problem using a hidden field. Luckily on client side i have all the information i need, so on client click i can assign my required data to a hidden field.
When my postback occures i can then access this information in the hidden field and if it contains data i use it then set it to String.Empty again. If it contains no data i know that a node that was added using load on demand has not been clicked.
Hope this makes sense and thanks to Rumen for pushing me in the right direction to find a solution.