The content of an UpdatePanel control is updated in the following circumstances:
If the UpdateMode property is set to Always, the
UpdatePanel control's content is updated on every postback that originates from anywhere on the page. This includes asynchronous postbacks from controls that are inside other
UpdatePanel controls and postbacks from controls that are not inside UpdatePanel controls.
If the UpdatePanel control is nested inside another UpdatePanel control and the parent update panel is updated.
If the UpdateMode property is set to Conditional, and one of the following conditions occurs:
The postback is caused by a control that is defined as a trigger by using the
Triggers property of the UpdatePanel control. In this scenario, the control explicitly triggers an update of the panel content. The control can be either inside or outside the
UpdatePanel control that defines the trigger.
The ChildrenAsTriggers property is set to true and a child control of the
UpdatePanel control causes a postback. A child control of a nested UpdatePanel control does not cause an update to the outer
UpdatePanel control unless it is explicitly defined as a trigger
according to the above documentation:
1. if I have a gridview inside an updatePanel with updateMode set to conditional, and controls outside of that updatePanel that control paging of the gridview, it should not work. The controls that manipulate the gridview pageIndex property for paging should
NOT actually work... but they do???? this is in contrast to the above documentation. Can anyone explain?
2. if I have a commandField in this same gridview, select, delete, update, etc... all those buttons should cause a postback *and* update the content of the updatePanel.... I'm running into situations where this is NOT happening????? Again, this would be
in contrast to the above documentation.
So, obviously I'm missing something important here, I know very well that there is no way there are tons of developers out there using asp.net/ajax control toolkit if it were really as broken as it appears to be to me right now. I mean that sincerely, not
sarcastically, I know I'm the one not understanding something here, hehe, can anyone explain?
1. if I have a gridview inside an updatePanel with updateMode set to conditional, and controls outside of that updatePanel that control paging of the gridview, it should not work. The controls that manipulate the gridview pageIndex property for paging should
NOT actually work... but they do???? this is in contrast to the above documentation. Can anyone explain?
why not?
c0pe
If the UpdateMode property is set to Conditional, and one of the following conditions occurs:
The postback is caused by a control that is defined as a trigger by using the
Triggers property of the UpdatePanel control. In this scenario, the control explicitly triggers an update of the panel content.
The control can be either inside or outside the UpdatePanel control that defines the trigger.
c0pe
2. if I have a commandField in this same gridview, select, delete, update, etc... all those buttons should cause a postback *and* update the content of the updatePanel.... I'm running into situations where this is NOT happening????? Again, this would be in
contrast to the above documentation.
Explain the scenario when this is happening and when this is not happening.
1. if I have a gridview inside an updatePanel with updateMode set to conditional, and controls outside of that updatePanel that control paging of the gridview, it should not work. The controls that manipulate the gridview pageIndex property for paging should
NOT actually work... but they do???? this is in contrast to the above documentation. Can anyone explain?
why not?
c0pe
If the UpdateMode property is set to Conditional, and one of the following conditions occurs:
The postback is caused by a control that is defined as a trigger by using the
Triggers property of the UpdatePanel control. In this scenario, the control explicitly triggers an update of the panel content.
The control can be either inside or outside the UpdatePanel control that defines the trigger.
because the controls outside the updatePanel that are controling paging are NOT defined as triggers. So according to the documentation they shouldn't work.
jerryjoseph
2. if I have a commandField in this same gridview, select, delete, update, etc... all those buttons should cause a postback *and* update the content of the updatePanel.... I'm running into situations where this is NOT happening????? Again, this would be
in contrast to the above documentation.
Explain the scenario when this is happening and when this is not happening.
I have a gridview inside an updatePanel with a commandField. All the buttons work except the select button. I add the select but explicitly as a trigger and it then works. I have the exact same type of setup on another page and the explicit trigger was not
necessary?
1. I had a response.write in my page load event for output of diagnostic troubleshooting information. That method is not supported with async postback as stated here:
2. I had my triggers defined backwards for the selectedIndexChanged event on my gridivew. The triggers where in the updatePanel that the gridview was in, instead they needed to be in the other updatePanel which has the content to be showen after a row is
selected in the gridview. I had it backwards.
c0pe
Member
319 Points
435 Posts
I'm really missing something regarding updatePanels!
Feb 25, 2012 07:37 PM|LINK
Hello,
from visual studio docs:
The content of an UpdatePanel control is updated in the following circumstances:
If the UpdateMode property is set to Always, the UpdatePanel control's content is updated on every postback that originates from anywhere on the page. This includes asynchronous postbacks from controls that are inside other UpdatePanel controls and postbacks from controls that are not inside UpdatePanel controls.
If the UpdatePanel control is nested inside another UpdatePanel control and the parent update panel is updated.
If the UpdateMode property is set to Conditional, and one of the following conditions occurs:
You call the Update method of the UpdatePanel control explicitly.
The postback is caused by a control that is defined as a trigger by using the Triggers property of the UpdatePanel control. In this scenario, the control explicitly triggers an update of the panel content. The control can be either inside or outside the UpdatePanel control that defines the trigger.
The ChildrenAsTriggers property is set to true and a child control of the UpdatePanel control causes a postback. A child control of a nested UpdatePanel control does not cause an update to the outer UpdatePanel control unless it is explicitly defined as a trigger
according to the above documentation:
1. if I have a gridview inside an updatePanel with updateMode set to conditional, and controls outside of that updatePanel that control paging of the gridview, it should not work. The controls that manipulate the gridview pageIndex property for paging should NOT actually work... but they do???? this is in contrast to the above documentation. Can anyone explain?
2. if I have a commandField in this same gridview, select, delete, update, etc... all those buttons should cause a postback *and* update the content of the updatePanel.... I'm running into situations where this is NOT happening????? Again, this would be in contrast to the above documentation.
So, obviously I'm missing something important here, I know very well that there is no way there are tons of developers out there using asp.net/ajax control toolkit if it were really as broken as it appears to be to me right now. I mean that sincerely, not sarcastically, I know I'm the one not understanding something here, hehe, can anyone explain?
jerryjoseph
Contributor
6740 Points
1257 Posts
Re: I'm really missing something regarding updatePanels!
Feb 25, 2012 08:10 PM|LINK
why not?
Explain the scenario when this is happening and when this is not happening.
linkedin | twitter | www.jerryjoseph.net
c0pe
Member
319 Points
435 Posts
Re: I'm really missing something regarding updatePanels!
Feb 25, 2012 08:41 PM|LINK
because the controls outside the updatePanel that are controling paging are NOT defined as triggers. So according to the documentation they shouldn't work.
Explain the scenario when this is happening and when this is not happening.
I have a gridview inside an updatePanel with a commandField. All the buttons work except the select button. I add the select but explicitly as a trigger and it then works. I have the exact same type of setup on another page and the explicit trigger was not necessary?
c0pe
Member
319 Points
435 Posts
Re: I'm really missing something regarding updatePanels!
Feb 26, 2012 06:44 PM|LINK
my issues were due to two things:
1. I had a response.write in my page load event for output of diagnostic troubleshooting information. That method is not supported with async postback as stated here:
http://msdn.microsoft.com/en-us/library/ie/bb386454.aspx
2. I had my triggers defined backwards for the selectedIndexChanged event on my gridivew. The triggers where in the updatePanel that the gridview was in, instead they needed to be in the other updatePanel which has the content to be showen after a row is selected in the gridview. I had it backwards.
I think I'm all set now.