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. clickable gridview

clickable gridview

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorial
6 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.
  • T Offline
    T Offline
    tek 2009
    wrote on last edited by
    #1

    hello everyone I would like to know how to do a double click on a gridview in asp.net / c # to open a page that displays the details of the column selected, I do a lot of research but I don't understand, please i need your support and thank you in advance

    S A 2 Replies Last reply
    0
    • T tek 2009

      hello everyone I would like to know how to do a double click on a gridview in asp.net / c # to open a page that displays the details of the column selected, I do a lot of research but I don't understand, please i need your support and thank you in advance

      S Offline
      S Offline
      Sneha Bisht
      wrote on last edited by
      #2

      May be this Help you can do this in rowdatabound event of grid e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#ffffff';"); here u have to find row and column what u selected from grid by javascript, then pass these ids in check page. e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#000000';"); e.Row.Cells[3].Attributes.Add("onmouseover", "javascript:window.open('check.aspx?id="+ val1+"','large','width=300,height=300,toolbar=0,menubar=0,scrollbars=0,location=0,resizable=0')");

      T 1 Reply Last reply
      0
      • S Sneha Bisht

        May be this Help you can do this in rowdatabound event of grid e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#ffffff';"); here u have to find row and column what u selected from grid by javascript, then pass these ids in check page. e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#000000';"); e.Row.Cells[3].Attributes.Add("onmouseover", "javascript:window.open('check.aspx?id="+ val1+"','large','width=300,height=300,toolbar=0,menubar=0,scrollbars=0,location=0,resizable=0')");

        T Offline
        T Offline
        tek 2009
        wrote on last edited by
        #3

        thank you very much for your help if you want I want to know "+ val" + it means what???

        T 1 Reply Last reply
        0
        • T tek 2009

          thank you very much for your help if you want I want to know "+ val" + it means what???

          T Offline
          T Offline
          tek 2009
          wrote on last edited by
          #4

          Here I write the code in RowDataBound: e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';this.style.textDecoration='underline';this.style.background='#FFF5E6'"; e.Row.Attributes["onmouseout"] = "this.style.textDecoration='none';this.style.background='none'"; e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this, "Select$" + e.Row.RowIndex); and to redirect to another page I write in SelectedIndexChanged: GridViewRow selectedRow = GridView1.SelectedRow; Label idLabel = (Label)selectedRow.FindControl("Label1"); Response.Redirect("aff.aspx?StructureId=" + idLabel .Text); but the last redirect code not working

          1 Reply Last reply
          0
          • T tek 2009

            hello everyone I would like to know how to do a double click on a gridview in asp.net / c # to open a page that displays the details of the column selected, I do a lot of research but I don't understand, please i need your support and thank you in advance

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #5

            I would like to request you to please go through this article. This will help you. Developing a row-clickable GridView[^] Thanks :)

            Cheers ! Abhijit Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

            T 1 Reply Last reply
            0
            • A Abhijit Jana

              I would like to request you to please go through this article. This will help you. Developing a row-clickable GridView[^] Thanks :)

              Cheers ! Abhijit Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

              T Offline
              T Offline
              tek 2009
              wrote on last edited by
              #6

              thank you very much, I will read it in order to have a solution, even if it works ruien my code that redirects to another page that does not work

              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