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. 2 select command in one gridview

2 select command in one gridview

Scheduled Pinned Locked Moved ASP.NET
databaseannouncement
4 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.
  • F Offline
    F Offline
    Flavia A
    wrote on last edited by
    #1

    hi all, In my gridview i have to select as well as update for which am using two link btns,am using a sr_no as the datakeyname and when i write string s = GridView1.SelectedValue.ToString(); for getting the sr_no it works fine in the selected index changed but i cannot get the sr_no when am using it for updation in the gridview1_rowupdating() event ... is there any way i can get the selected value of the gridview as it is important that i have 2 buttons in the gridview .

    A 1 Reply Last reply
    0
    • F Flavia A

      hi all, In my gridview i have to select as well as update for which am using two link btns,am using a sr_no as the datakeyname and when i write string s = GridView1.SelectedValue.ToString(); for getting the sr_no it works fine in the selected index changed but i cannot get the sr_no when am using it for updation in the gridview1_rowupdating() event ... is there any way i can get the selected value of the gridview as it is important that i have 2 buttons in the gridview .

      A Offline
      A Offline
      Arun Jacob
      wrote on last edited by
      #2

      try this, gvwName.DataKeys[e.RowIndex].Value :)

      Arun Jacob http://codepronet.blogspot.com/

      F 1 Reply Last reply
      0
      • A Arun Jacob

        try this, gvwName.DataKeys[e.RowIndex].Value :)

        Arun Jacob http://codepronet.blogspot.com/

        F Offline
        F Offline
        Flavia A
        wrote on last edited by
        #3

        Thanks it worked

        A 1 Reply Last reply
        0
        • F Flavia A

          Thanks it worked

          A Offline
          A Offline
          Arun Jacob
          wrote on last edited by
          #4

          Flavia A wrote:

          Thanks it worked

          :thumbsup:

          Arun Jacob http://codepronet.blogspot.com/

          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