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 row index of a gridview is call onRowClickEvent in javascript?

How row index of a gridview is call onRowClickEvent in javascript?

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

    How row index of a gridview is call onRowClickEvent in javascript? Also provide some code plz........... :)

    P 1 Reply Last reply
    0
    • D diyaa_08

      How row index of a gridview is call onRowClickEvent in javascript? Also provide some code plz........... :)

      P Offline
      P Offline
      Pranay Rana
      wrote on last edited by
      #2

      you have to code in row click event of the grid view code is protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onClick", "alert("+ e.Row.RowIndex +")"); } }

      D 1 Reply Last reply
      0
      • P Pranay Rana

        you have to code in row click event of the grid view code is protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onClick", "alert("+ e.Row.RowIndex +")"); } }

        D Offline
        D Offline
        diyaa_08
        wrote on last edited by
        #3

        i hav 2 grid s in javascript i hav 2 move s4lected row from one grid to another thru btn when i clik selected row it gives me index but when i move the selected row to gv2 after cliking movebtn it also gives me index. but how 2nd time index is move? i am little confuzed i hav to call row index on grid's onRowClick event. how all of this scenario is called ?

        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