- I am using the latest GoWeb and VS2008.
- I have a list of items on the page (like a menu). When I click any item, I need to (re)draw its’ corresponding GoView diagram, in Ajax style, no full postback.
- I wrote a method (DrawView) that creates the diagram.
- If I call DrawView in the PageLoad() then the view renders nicely.
- If I click an item in the list mentioned above, DrawView gets called but the view is not (re)drawn until I click on it!
Can you please tell me where I go wrong? Thanks!
Can you add your company email address to your profile? thanks.
It sounds like your DrawView is on the server side? What you need is some script on the client side to trigger the refresh.
Read through the GoWebIntro section on client side event handling and the section after that on Server-side event handling. It sounds like you need some sort of goAction call to update the GoView. (the “request” goAction is there for your use)
Thanks for you answer.
I updated my email and I will look at the document. And you are right, the DrawView is a server side method.
BTW, does any of the samples implement such Ajax refreshing?
A lot of our demo have things like a button that deletes a node or selects all the nodes, and those all work via the builtin goAction requests. I don’t see any of our samples that use the “request” keyword though.
sm.AddScript("clientRefreshGoView('" + theViewControl.UniqueID + "');");
setTimeout('goPost("' + imgID + '", "");', 250);