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. Row index of datagrid from code render - how ?

Row index of datagrid from code render - how ?

Scheduled Pinned Locked Moved ASP.NET
htmldatabasequestion
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.
  • I Offline
    I Offline
    israeli
    wrote on last edited by
    #1

    Hi everybofy, I want to send the row index of a datagrid as an argument of a function from the html: Thanks

    M R 2 Replies Last reply
    0
    • I israeli

      Hi everybofy, I want to send the row index of a datagrid as an argument of a function from the html: Thanks

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, Each row of the datagrid control is represented by the DataGridItem object. So if you want to get the item index, you first need to get reference to the item, then get the value of the ItemIndex property. The sample code looks something like:

      <asp:HyperLink NavigateUrl='<%# GetUrl(((DataGridItem)Container).ItemIndex) %>'>

      The GetUrl method takes the item index (the integet type) as the method parameter.

      1 Reply Last reply
      0
      • I israeli

        Hi everybofy, I want to send the row index of a datagrid as an argument of a function from the html: Thanks

        R Offline
        R Offline
        Rustamyan
        wrote on last edited by
        #3

        Make sure if the grid control is ASP or HTML, so try write the following grid[i].GerRowIndex(i,NULL) Get the spirit if tomorrow

        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