Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. OnSubmit, display grid

OnSubmit, display grid

Scheduled Pinned Locked Moved ASP.NET
databasecss
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vanikanc
    wrote on last edited by
    #1

    Hello, Some parameters are entered on a form, on submit, based on values entered on form I have the results from the database bind onto a grid. That part is working. Now, I have selected the "allowpaging" option. When I click on Page 2(hyperlink), it comes back the initial form, with parameter listing. I have created an OnClick event where it collects the values from form, then set up a public variable, send this value to another sub to query the database and display results. any ideas would be helpful. Thanks so much for your time.

    T 1 Reply Last reply
    0
    • V vanikanc

      Hello, Some parameters are entered on a form, on submit, based on values entered on form I have the results from the database bind onto a grid. That part is working. Now, I have selected the "allowpaging" option. When I click on Page 2(hyperlink), it comes back the initial form, with parameter listing. I have created an OnClick event where it collects the values from form, then set up a public variable, send this value to another sub to query the database and display results. any ideas would be helpful. Thanks so much for your time.

      T Offline
      T Offline
      Tarun Dudhatra
      wrote on last edited by
      #2

      If you can post some sample code than it will be great help for other user to answer. Let me ask you one thing you have set allowpaing='true' but do you write PageIndexChange event like below protected void gridView_PageIndexChanging(object sender, GridViewPageEventArgs e) { gridView.PageIndex = e.NewPageIndex; gridView.DataBind(); } If not then try this. Other wise just provide some code which is causing an issue so other user can look into that. Hope this will help. My DotNet Stuff

      V 1 Reply Last reply
      0
      • T Tarun Dudhatra

        If you can post some sample code than it will be great help for other user to answer. Let me ask you one thing you have set allowpaing='true' but do you write PageIndexChange event like below protected void gridView_PageIndexChanging(object sender, GridViewPageEventArgs e) { gridView.PageIndex = e.NewPageIndex; gridView.DataBind(); } If not then try this. Other wise just provide some code which is causing an issue so other user can look into that. Hope this will help. My DotNet Stuff

        V Offline
        V Offline
        vanikanc
        wrote on last edited by
        #3

        Yes, I have allowpaging set to true. And also that piece of code for the PageIndexChanging. The issue is with submit button on the page which probably initialises the page, then how would the grid control work?

        D 1 Reply Last reply
        0
        • V vanikanc

          Yes, I have allowpaging set to true. And also that piece of code for the PageIndexChanging. The issue is with submit button on the page which probably initialises the page, then how would the grid control work?

          D Offline
          D Offline
          Dhyanga
          wrote on last edited by
          #4

          it should

          suchita

          V 1 Reply Last reply
          0
          • D Dhyanga

            it should

            suchita

            V Offline
            V Offline
            vanikanc
            wrote on last edited by
            #5

            I ended up opening a pop-up window to show the grid. IT was easier to control this window.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups