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 8890299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:28:11+00:00 2026-06-14T22:28:11+00:00

I am using C# ,here i attach my partial code for dynamic grid view

  • 0

I am using C# ,here i attach my partial code for dynamic grid view its working fine . I need to set paging on the dynamic grid view how can i call the OnPageIndexChanging

       GridView gv = new GridView();
        gv.AllowPaging = false;
        gv.AlternatingRowStyle.BackColor = System.Drawing.Color.WhiteSmoke;
        gv.GridLines = GridLines.Horizontal;
        gv.CellPadding = 2;
        gv.CellSpacing = 5;
        gv.HeaderStyle.BackColor=System.Drawing.Color.Black;
        gv.HeaderStyle.ForeColor = System.Drawing.Color.White;

        gv.AutoGenerateColumns = false;
        BoundField nameColumn = new BoundField();
        nameColumn.DataField = "fld_id";
        nameColumn.HeaderText = "First Name";
        gv.Columns.Add(nameColumn);
        nameColumn = new BoundField();
        nameColumn.DataField = "fld_name";
        nameColumn.HeaderText = "Last Name";
        gv.Columns.Add(nameColumn);
        nameColumn = new BoundField();
        nameColumn.DataField = "fld_state";
        nameColumn.HeaderText = "Age";
        gv.Columns.Add(nameColumn);

        gv.DataSource = ds;

        gv.DataBind();
        plangrid.Controls.Add(gv);
  • 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-14T22:28:12+00:00Added an answer on June 14, 2026 at 10:28 pm
    gv.AllowPaging = true;
    gv.PageSize =10;
    gv.PageIndexChanged+= new EventHandler(grid1_PageIndexChanged);
    
    protected void grid1_PageIndexChanged(object sender, GridViewPageEventArgs e)
    {
    gv.PageIndex = e.NewPageIndex;
    gv.Databind();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use this code to send mail using java. In here i attach a
Im using the code found [here][1] to attach image on video taken using UIImagePickerController
Im using TinyMCE here is my code :- tinyMCE.init({ // General options mode :
I'm reading a csv file using c# here is a little code snippet. using
Here is my code: public ActionResult DeleteItem(int id) { using (var cont = new
I need to encrypt a string using MySQL's AES_ENCRYPT function, then attach that encrypted
Using ASP.NET MVC and Entity Framework, I encounter some attach/detach errors when I need
I'm trying to send emails out using MIME::Lite with authentication. Here's the code snippet
Here's a much simplified version of my code: Create the collection using the collection
I'm using this tickertype jquery plugin: http://www.hungry-media.com/code/jQuery/tickerType/ And I'm trying to attach a hover

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.