Wednesday, March 21, 2012

Ajax and CallBack?

Hi,

I recently started playing with Asp .Net Ajax - Hopefully this is a silly issue to most people in this forum and will quickly get resolved.

I started off with a page that has a treeview and a gridview each in a different UpdatePanel Control. The TreeView control is vanilla Asp control and its nodes expand using Call backs. I find that once I expand a node in the treeview, subsequent async postbacks to the gridview also renders the treeview control. Basically I am expecting a partial page update of the gridview control, but find the "OnTreeNodePopulate" gets triggered and the expanded nodes get re-rendered. Am I missing something?

Any suggestions?

Thanks,

Savitha

Updating subject.I guess this behavior has to do with a partial update of the grid view control following a treenode poulate call back from the treeview control. My first impression is that this is a bug. Could someone please clarify what is going on.

Thanks!


Try usingUpdateMode and

<asp:AsyncPostBackTriggerControlID="name of the control"/>

of UpdatePanel

here you can find more about updatePanelhttp://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx

let me know if still an issue.


adding some more info to that

read the sectionUpdatePanel Compatible Controls in the above link..

The following ASP.NET controls are not supported inside of anUpdatePanel:

TreeView andMenu


Thanks! As you suggested I tried the <asp:AsyncPostBackTrigger> in the GridView's updatePanel control and the treeview no longer renders when the GridView posts back. However, why does it work?

Thanks,

Savitha

No comments:

Post a Comment