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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Data in Gridview ASP .Net on button click event

Data in Gridview ASP .Net on button click event

Scheduled Pinned Locked Moved ASP.NET
csharphelpquestiondatabaselearning
2 Posts 2 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.
  • S Offline
    S Offline
    Shazz Rock
    wrote on last edited by
    #1

    Hello All, I am beginner in ASP .NET I had used SQL2000, GridView and SQLDataSource. While creating SQDataSource1 query was mentioned "Select top 5 EmployeeId, FirstName from Employee". As page is loaded it show data without error. Now I had added button on its click event I had used mentioned query "Select top 5 ProductId, ProductName from Product". My question is can again GridView can be bind with DataKeyNames. If yes how can i do it. I had try code in vb & c#. Please help. Thanks in advance

    Shazz here to help you...

    N 1 Reply Last reply
    0
    • S Shazz Rock

      Hello All, I am beginner in ASP .NET I had used SQL2000, GridView and SQLDataSource. While creating SQDataSource1 query was mentioned "Select top 5 EmployeeId, FirstName from Employee". As page is loaded it show data without error. Now I had added button on its click event I had used mentioned query "Select top 5 ProductId, ProductName from Product". My question is can again GridView can be bind with DataKeyNames. If yes how can i do it. I had try code in vb & c#. Please help. Thanks in advance

      Shazz here to help you...

      N Offline
      N Offline
      NetMan2012
      wrote on last edited by
      #2

      hi, do you want to bind the grid with product columns now? I think not possible, I think you should call a user control on click event, use grid view on that control and bind your product columns on that.

      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