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. General Programming
  3. C#
  4. how to redirect the page when the particular cell in the datagridview is double clikced

how to redirect the page when the particular cell in the datagridview is double clikced

Scheduled Pinned Locked Moved C#
helptutorial
5 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.
  • A Offline
    A Offline
    Anjani Poornima
    wrote on last edited by
    #1

    hello I am having datagridview with columns Description area rate and value. All the columns are datagridview textbox columns. the description column when clikced where we can enter the description and when the columns area,rate and value are double clikced then the page must redirect to another page. I tried this by the event CellDoubleClick but i can't get what i required Plz, help me in doing this.

    H S 2 Replies Last reply
    0
    • A Anjani Poornima

      hello I am having datagridview with columns Description area rate and value. All the columns are datagridview textbox columns. the description column when clikced where we can enter the description and when the columns area,rate and value are double clikced then the page must redirect to another page. I tried this by the event CellDoubleClick but i can't get what i required Plz, help me in doing this.

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      Anjani Poornima wrote:

      I tried this by the event CellDoubleClick but i can't get what i required

      What does this mean? What do you get? What have you tried?

      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

      A 1 Reply Last reply
      0
      • A Anjani Poornima

        hello I am having datagridview with columns Description area rate and value. All the columns are datagridview textbox columns. the description column when clikced where we can enter the description and when the columns area,rate and value are double clikced then the page must redirect to another page. I tried this by the event CellDoubleClick but i can't get what i required Plz, help me in doing this.

        S Offline
        S Offline
        Saksida Bojan
        wrote on last edited by
        #3

        What is your problem excactly? If you don't know how to redirect, look here Response.Redirect()[^]

        Anjani Poornima wrote:

        I tried this by the event CellDoubleClick but i can't get what i required

        Did you get any good data from the event as in what cell contained or from witch row was it?

        1 Reply Last reply
        0
        • H Henry Minute

          Anjani Poornima wrote:

          I tried this by the event CellDoubleClick but i can't get what i required

          What does this mean? What do you get? What have you tried?

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

          A Offline
          A Offline
          Anjani Poornima
          wrote on last edited by
          #4

          hello, I wrote the code for redirecting the page in celldoubleclick event. It make me redirect the page when the column is doubleclicked. But what i need is only when the column 'area' is doubleclicked it must redirect the page. Here i have to check the condition only when the column area is double clicked it must redirect the page. How to do this.What event i have to use. Plz, help me in doing this.

          H 1 Reply Last reply
          0
          • A Anjani Poornima

            hello, I wrote the code for redirecting the page in celldoubleclick event. It make me redirect the page when the column is doubleclicked. But what i need is only when the column 'area' is doubleclicked it must redirect the page. Here i have to check the condition only when the column area is double clicked it must redirect the page. How to do this.What event i have to use. Plz, help me in doing this.

            H Offline
            H Offline
            Henry Minute
            wrote on last edited by
            #5

            There are two DoubleClick events for a cell CellDoubleClick, which you have already used, and CellContentDoubleClick. The DataGridView is very fussy about exactly where you click. If you double-click on the displayed value but are only handling the CellDoubleClick event, nothing happens. Conversely, if you double-click in the cell, but not on the displayed value and you are only handling the CellContentDoubleClick event, nothing happens then either. Set up a handler method for both:

            	private void dataGridView1\_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
            	{
            		MessageBox.Show("Content DoubleClick");
            	}
            
            	private void dataGridView1\_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
            	{
            		MessageBox.Show("Cell DoubleClick");
            	}
            

            and experiment with the placement of your double-clicks.

            Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

            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