Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6153291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:04:14+00:00 2026-05-23T20:04:14+00:00

I have a gridview that receives a data source with 8621 entries with the

  • 0

I have a gridview that receives a data source with 8621 entries with the page size set to 20. The first page is displayed exactly as it should be. I click the link to display page 2, and it also displays as it should. Anything after that however is still page 2. So if I click the link to go to page 3, the paging control updates saying I am on page 3, but the data displayed is the data on page 2. I know the gridview is getting all 8621 entries because if I change the page size to 200 it displays those 200. Why would the gridview work correctly for some pages but not others? Anyways, enough with my rambling, here is the code itself:

<ajax:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<cb:SortedGridView ID="SearchUsersGrid" runat="server" AutoGenerateColumns="False" DataKeyNames="Email" 
  DefaultSortDirection="Ascending" DefaultSortExpression="Email"
  AllowPaging="true" PageSize="20" AllowSorting="true" Width="100%" SkinID="PagedList">
<Columns>
<asp:TemplateField HeaderText="In List">
  <ItemStyle HorizontalAlign="Center" />
  <ItemTemplate>
    <asp:CheckBox ID="IsInEmailList2" runat="server" checked='<%#IsInEmailList(Container.DataItem)%>' OnCheckedChanged="IsInEmailList_CheckedChanged" AutoPostBack="true" ></asp:CheckBox>
  </ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Email" SortExpression="Email">
  <HeaderStyle HorizontalAlign="Left" />
     <ItemStyle HorizontalAlign="Left" />
      <ItemTemplate>
       <asp:HyperLink ID="NameLink2" runat="server" Text='<%# Eval("Email") %>' NavigateUrl='<%#GetEditUserUrl(Container.DataItem)%>'></asp:HyperLink>
      </ItemTemplate>
      </asp:TemplateField>
<asp:TemplateField HeaderText="Name" SortExpression="LastName">
  <HeaderStyle horizontalalign="Left" />
     <ItemStyle horizontalalign="Left" />
        <ItemTemplate>
          <asp:Label ID="FullNameLabel2" runat="server" Text='<%#GetFullName(Container.DataItem)%>'></asp:Label>
         </ItemTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
  <div align="center">
    <asp:Label runat="server" ID="noUsersFound" enableViewState="false" Text="No matching users found."/>
  </div>
 </EmptyDataTemplate>
 </cb:SortedGridView>
 </ajax:UpdatePanel>

and some relevant code behind:

    SearchUsersGrid.Visible = true;
    SearchUsersGrid.DataSourceID = "SearchUsersDs";
    SearchUsersGrid.DataBind();

and the data source itself

<asp:ObjectDataSource ID="SearchUsersDs" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="FindUsersByName" TypeName="Builder.Users.UserDataSource"
  SelectCountMethod="CountUsersByName" EnablePaging="True" SortParameterName="sortExpression" DataObjectTypeName="Builder.Users.User" DeleteMethod="Delete">
 <SelectParameters>
     <asp:ControlParameter ControlID="SearchText" Name="searchPattern" PropertyName="Text" Type="String" />
     <asp:ControlParameter ControlID="SearchByDropDown" Name="searchField" PropertyName="SelectedValue" Type="Object" />
</SelectParameters>
</asp:ObjectDataSource>

There is no PageIndexChanged event. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:04:15+00:00Added an answer on May 23, 2026 at 8:04 pm

    I think the issue had to do with our production server. for some reason the code works great on our production box (even with the same data).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a gridview that shows (50)rows of data per page. I have the
I have GridView that allows select. It takes data from EntityDataSource . How do
I have a gridview that is set to a sql datasource, it is generating
I have a gridview that I am populating with data for the folks in
I have a GridView that uses an adapter to set ImageViews and when I
I have a gridview that displays data that I retrieved from a database along
I have a gridview that gets its data from a webservice. This comes into
I have a GridView that displays data on three columns. On the third column
I have a gridview that is displaying data from a database using LINQ to
I have a GridView that I would like to bind to an ObjectDataSource. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.