Saturday, March 24, 2012

Asp.net 2.0 Ajax Gridview

Hi,

I was trying to create GridView with Ajax. I am using ASP.net 2.0 with Ajax Extensions installed.

I have Page already running with Gridview in it, I just want to enable Ajax for that.

So, I did..

1. Add ScriptManager tag to page from Toolbox <asp:ScriptManager ID="ScriptManager1" runat="server" />
2. Add UpdatePanel around GridView

<asp:UpdatePanel ID="udpOrderDetails" runat="server">
<ContentTemplate>
<asp:GridView
id="gvOrderDetails" runat="server"
DataSourceID="sqldsOrderDetails" AutoGenerateColumns="false">
</ContentTemplate>
</asp:UpdatePanel>

When I run the page, nothing happning!!!
Before I add these tags, Paging used to work in GridView, but now even paging is not working...

Can somebody help me to solve this issue??

Thanks

did you add the script manager inside the form tag and before any other controls?


I'm assuming there's more to the GridView code, since the tag isn't self closed and AutoGenerateColumns is false. If it's not too big, can you show the full code inside your UpdatePanel's ContentTemplate?


Tell me one thing.

Does your data in grid view are coming properly .

and Is it the problem that even after implementing update panel your whole page is loading again.

Please explain your problem.


you haven't shown code and your description could be for a few different problems, but if the gridview is able to initially load within the update panel, and then clicking on say a paging button makes the grid view disappear, then it is almost definitely a viewstate problem.


Hi,

I'd like to add one to those opinions above, please also make your configuration is correct.

You may refer to this documentation for more information: http://asp.net/AJAX/Documentation/Live/ConfiguringASPNETAJAX.aspx

No comments:

Post a Comment