Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 24, 2012 01:01 PM by Erickinhu
Member
3 Points
11 Posts
Dec 24, 2012 10:39 AM|LINK
Hi guys,
I have a Grid in an UpdatePanel with a trigger to a button. But it doesn't refresh the data when I click to the button. I have conditional UpdateMode, and i call a UpdatePanel5.Update() when I want to refresh, but it doesn't work :S
<td style="width:28%;" align= "left"> <asp:ImageButton ID="BtnBuscarTit" runat="server" OnClick="lnkBuscarTitulares" ImageUrl="~/web/Images/btn_buscar.GIF"/> </td>
<asp:UpdatePanel ID="UpdatePanel5" runat="server" UpdateMode="conditional"> <Triggers> <asp:AsyncPostBackTrigger ControlID="BtnBuscarTit" EventName="Click" /> </Triggers> <ContentTemplate> <asp:GridView ID="RejillaTitularesExp"
...
</asp:UpdatePanel>
Any idea? Regards
Contributor
3014 Points
575 Posts
Dec 24, 2012 10:51 AM|LINK
Keep that button in UpdatePanel.
Because you need to keep both in the update panel, else the button event can not apply anything on grid, which is inside update panel.
Lets give it try.
Mark as answer if it helps you.
Dec 24, 2012 01:01 PM|LINK
It works fine! :-)
Erickinhu
Member
3 Points
11 Posts
UpdatePanel doesn't refresh a Grid
Dec 24, 2012 10:39 AM|LINK
Hi guys,
I have a Grid in an UpdatePanel with a trigger to a button. But it doesn't refresh the data when I click to the button. I have conditional UpdateMode, and i call a UpdatePanel5.Update() when I want to refresh, but it doesn't work :S
<td style="width:28%;" align= "left">
<asp:ImageButton ID="BtnBuscarTit" runat="server" OnClick="lnkBuscarTitulares" ImageUrl="~/web/Images/btn_buscar.GIF"/>
</td>
<asp:UpdatePanel ID="UpdatePanel5" runat="server" UpdateMode="conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="BtnBuscarTit" EventName="Click" />
</Triggers>
<ContentTemplate>
<asp:GridView ID="RejillaTitularesExp"
...
</asp:UpdatePanel>
Any idea? Regards
Sujeet Saste
Contributor
3014 Points
575 Posts
Re: UpdatePanel doesn't refresh a Grid
Dec 24, 2012 10:51 AM|LINK
Keep that button in UpdatePanel.
Because you need to keep both in the update panel, else the button event can not apply anything on grid, which is inside update panel.
Lets give it try.
Mark as answer if it helps you.
Do FEAR (Face Everything And Rise)
Please mark as Answer if my post helps you..!
My Blog
Erickinhu
Member
3 Points
11 Posts
Re: UpdatePanel doesn't refresh a Grid
Dec 24, 2012 01:01 PM|LINK
It works fine! :-)