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

  • SEARCH
  • Home
  • 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 8703297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:50:40+00:00 2026-06-13T02:50:40+00:00

I have a fairly simple asp grid view, tied to an object data source.

  • 0

I have a fairly simple asp grid view, tied to an object data source. What I want to have is this gridview update on a button click with results that a dynamic depending on the value within a textbox (it’s the basis for a search screen).

So far, everything works as such:

ASPX File:

<h3>Search Parameters</h3>
<div>
   Account Name
   <asp:TextBox runat="server" ID="AccountName"></asp:TextBox>
</div>

<asp:Button ID="Search" runat="server" Text="Search" OnClick="Search_Click" />

<asp:GridView runat="server" ID="SearchGrid" DataSourceID="ObjectDataSource1" AutoGenerateColumns="False" Width="100%" AllowPaging="True" CellPadding="4" ForeColor="#333333" GridLines="None" >
   <Columns>
      <asp:BoundField DataField="PartyID" HeaderText="Party ID" SortExpression="PartyID" />
      <asp:BoundField DataField="PartyName" HeaderText="Party Name" SortExpression="PartyName" />
       <asp:BoundField DataField="CompleteAddress" HeaderText="Address" SortExpression="CompleteAddress" />
     </Columns>
     <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
 </asp:GridView>

 <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="DIS.Data.DataSetAccountsTableAdapters.GetAccountsBySearchParametersTableAdapter">
   <SelectParameters>
      <asp:Parameter Name="PartyName" Type="String" />
   </SelectParameters>
</asp:ObjectDataSource>

ASPX.CS File:

protected void Search_Click(object sender, EventArgs e)
{
   ObjectDataSource1.SelectParameters["PartyName"].DefaultValue = AccountName.Text;
 }

At face value, everything works. The user enters text into the account name box, hits search, and the grid view is updated with the appropriate values.

The problem occurs when we get enough row to generate paging. The page links are shown on the GridView, but clicking on them has no effect at all – The values will remain consistently on page 1.

I believe that it may be something to do with the postback when the page link is clicked, but unfortunately my knowledge in this area is not strong enough to actually diagnose what exactly is happening.

Any help would be greatly appreciated
Best regards

  • 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-06-13T02:50:41+00:00Added an answer on June 13, 2026 at 2:50 am

    OK, on further testing it doesn’t appear to be a GridView specific issue.

    We aer also using JQuery mobile, and it seems that it’s those scripts that are causing the issue. Disabling them removed the problem.

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

Sidebar

Related Questions

I have a fairly simple GridView. This is the markup for Columns: <Columns> <asp:TemplateField
I have a fairly simple data audit web application written with ASP MVC which
I have a performance issue with a fairly simple ASP.MVC view. It's a log-on
Hopefully this is simple. I have a fairly simple ASP.NET (framework version 2) app
I have a Master Page with nested pages in ASP.NET. Fairly simply I want
I have a fairly simple form: <asp:FormView> <EditItemTemplate> <asp:LoginView> <RoleGroups> <asp:RoleGroup roles=Blah> <ContentTemplate> <!--
I have fairly simple layout, like this: <div class=card> <span class=attack>1</div> <span class=defence>2</div> </div>
I have a fairly simple iOS 5 app at this point. A UINavigationController is
I have a fairly simple ASP.NET 2.0 menu control using a sitemap file and
I have a fairly simple ASP.NET application, set up as a Web Application Project

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.