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. GridView control help [modified]

GridView control help [modified]

Scheduled Pinned Locked Moved ASP.NET
help
4 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.
  • E Offline
    E Offline
    eric_tran
    wrote on last edited by
    #1

    GDay everyone, I have a problem with Gridview that I really need someone's help. I'd like to get data of the record at which user clicks on the select hyperlink of that record in GridView. I need to save it and use it to populate data of that record into another form. Please give me a solution. Thanks in advance. Eric -- modified at 6:55 Tuesday 15th May, 2007

    eric

    S B 2 Replies Last reply
    0
    • E eric_tran

      GDay everyone, I have a problem with Gridview that I really need someone's help. I'd like to get data of the record at which user clicks on the select hyperlink of that record in GridView. I need to save it and use it to populate data of that record into another form. Please give me a solution. Thanks in advance. Eric -- modified at 6:55 Tuesday 15th May, 2007

      eric

      S Offline
      S Offline
      Sherin Iranimose
      wrote on last edited by
      #2

      Hi,

          Dim row As GridViewRow = GridView1.SelectedRow
          Dim lbl As Label = row.Cells(1).Controls(1)
          MsgBox(lbl.Text)
      

      This will get second cell value and display it(First cell is select link). u can use Cells(1 or 2 or 3...) for each cell. U should specify selectcommand to the data source(ur select query).


      If U Have Interest, U Can... Sherin Iranimose


      E 1 Reply Last reply
      0
      • E eric_tran

        GDay everyone, I have a problem with Gridview that I really need someone's help. I'd like to get data of the record at which user clicks on the select hyperlink of that record in GridView. I need to save it and use it to populate data of that record into another form. Please give me a solution. Thanks in advance. Eric -- modified at 6:55 Tuesday 15th May, 2007

        eric

        B Offline
        B Offline
        Bijay Bhaskar Deo
        wrote on last edited by
        #3

        Hi Chrish, U could use the RowCommand event for ur problem u cited.

        Bijay Bhaskar Deo Thanks & Regard

        1 Reply Last reply
        0
        • S Sherin Iranimose

          Hi,

              Dim row As GridViewRow = GridView1.SelectedRow
              Dim lbl As Label = row.Cells(1).Controls(1)
              MsgBox(lbl.Text)
          

          This will get second cell value and display it(First cell is select link). u can use Cells(1 or 2 or 3...) for each cell. U should specify selectcommand to the data source(ur select query).


          If U Have Interest, U Can... Sherin Iranimose


          E Offline
          E Offline
          eric_tran
          wrote on last edited by
          #4

          I populate data into Gridview from BusinessLogicLayer, so I cannot specify selectcommand to the datasource. I attempted your solution, but I desnot work. Please help

          eric

          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