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. how to catch the row number

how to catch the row number

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
3 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.
  • S Offline
    S Offline
    souravghosh18
    wrote on last edited by
    #1

    In my application i want to catch the row number of a gridview from the click event of a button,which is inside the cell of the gridview.Actually i want to know the row number of the button clicked.How can it be achieved?? Thanx in advance.

    D N 2 Replies Last reply
    0
    • S souravghosh18

      In my application i want to catch the row number of a gridview from the click event of a button,which is inside the cell of the gridview.Actually i want to know the row number of the button clicked.How can it be achieved?? Thanx in advance.

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Quite a few ways. Add an attribute to your button and set its value as Container.DisplayIndex. Then you can access this attribute in the click event of the button to get the row index. You can also do the same using the naming container property.

      It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD

      1 Reply Last reply
      0
      • S souravghosh18

        In my application i want to catch the row number of a gridview from the click event of a button,which is inside the cell of the gridview.Actually i want to know the row number of the button clicked.How can it be achieved?? Thanx in advance.

        N Offline
        N Offline
        Not Active
        wrote on last edited by
        #3

        Several ways to handle this, but this[^] should give you a start


        only two letters away from being an asset

        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