Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
739
Reloading WebImageViewer on WebDataTreee node click
posted

I have a web data tree that I want to use to control the contents of a WebImageViewer.  I have the NodeClick event set to Async and in that event I am resetting the DataSource of the web image viewer, but nothing is happening:

image1.DataSource = data

;

image1.DataBind();

 

I wonder if it's because of the async nature of the postback.  Does anyone know how to make this work?  If I can't get it to work I'll move the WebImageViewer into an iframe and set the contents from Javascript using querystring params that give the tree node value - that's worked for me before.

 

Thanks.

Parents
  • 4493
    Verified Answer
    posted

    Hello,

    Indeed you are observing this behaviour due the Async postback caused by WebDataTree. Eventhough you are changing data source of WebImageViewer, nothing is happening to it, since it did not initiated an async postback.

    What I can suggest here to experiment with, is putting WebImageViewer inside a ContentTemplate of an UpdatePanel. Then, on the Async postback of NodeClick handler on the server, after binding the WebImageViewer to the new data source, call Update() method of the UpdatePanel. This should work.

    Hope this helps

Reply Children
No Data