Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Gridview inside UpdatePanel, paging/sorting doesn't work ONLY when using MasterPage

$
0
0

Hi all,

Gridview looks a bit like this:

<asp:UpdatePanel runat="server"
ID="upGdvPendingReview"
ChildrenAsTriggers="true"
UpdateMode="Conditional"><ContentTemplate><asp:GridView
          ID="gdvPendingReview"
          runat="server"
          PageSize="10"
          AllowPaging="true"
          AllowSorting="true"><columnCrudHere></asp:GridView></ContentTemplate></asp:UpdatePanel>

Gridview is bound to linqdatasource using the Selecting event. This code works perfectly without the updatepanel. It also works perfectly if I copy to a page that isn't a Content Page to a Master Page. I've read a lot of posts about gridview issues in update panels with paging and sorting. In fact, there is one where they guy comments at the end that he got it working but it still fails when using a MasterPage. I've tried using a scriptmanager in the same page as the gridview and changing various options of the scriptmanager. To get it working, I just create a new page, copy my gridview, linqdatasource, scriptmanager, and code behind...and boom it works. It makes me wonder if I have something else in the page getting in the way. I do have other updatepanels where I can update content fine. So, this...combined with the post where the same issue is mentioned briefly has me perplexed.

I've also tried explicitly listing the event:

<Triggers><asp:AsyncPostBackTrigger ControlID="gdvPendingReview" EventName="PageIndexChanging" /></Triggers>

As I continue to test this, it becomes more frustrating and fascinating. I have created two new pages with only the gridview, linqdatasource, scriptmanager, and databinding methods. One page has no master....the other page has a master (but a completely new and clean one to avoid any possible interference). Same results! Paging/Sorting works great asynchronously as long as I'm not using a master page. :(

Thanks all!


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>