3 Replies - 2525 Views - Last Post: 08 June 2011 - 11:32 PM Rate Topic: -----

#1 John-Ellis  Icon User is offline

  • D.I.C Regular

Reputation: 7
  • View blog
  • Posts: 305
  • Joined: 23-March 10

datagrid view control double click on a cell

Posted 08 June 2011 - 05:44 AM

Hi All,

Just a quick question, I am creating an application for a college assignment called "Quote Manager" - the idea is a writer can save his / her favourite quotes, then go back to them and be able to print them.

So I had this idea where all the quotes are loaded into a datagrid view on the main screen of the program and the user can double click on the quote he / she wants to load.

I don't want any code given I would also post what I have got so far but at the moment I am at work.

What I want is to know how to manipultate the datagridview control so when a cell is double clicked a saved html page will load from a database.

Thanks very much

John

Is This A Good Question/Topic? 0
  • +

Replies To: datagrid view control double click on a cell

#2 Nightfish  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 73
  • View blog
  • Posts: 158
  • Joined: 24-May 11

Re: datagrid view control double click on a cell

Posted 08 June 2011 - 05:50 AM

I've got something like such:

Private Sub grdDblClk(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GridControl1.DoubleClick
MessageBox.Show("Hey, stop double clicking me!")
End Sub



This handles double clicks on my table. Instead of the MessageBox you'd put your stuff. And instead of "GridConrol1.DoubleClick" you'd put whatever your table thingy is called.

This post has been edited by Nightfish: 08 June 2011 - 05:51 AM

Was This Post Helpful? 1
  • +
  • -

#3 John-Ellis  Icon User is offline

  • D.I.C Regular

Reputation: 7
  • View blog
  • Posts: 305
  • Joined: 23-March 10

Re: datagrid view control double click on a cell

Posted 08 June 2011 - 11:15 AM

View PostNightfish, on 08 June 2011 - 05:50 AM, said:

I've got something like such:

Private Sub grdDblClk(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GridControl1.DoubleClick
MessageBox.Show("Hey, stop double clicking me!")
End Sub



This handles double clicks on my table. Instead of the MessageBox you'd put your stuff. And instead of "GridConrol1.DoubleClick" you'd put whatever your table thingy is called.


That's something to get me started.

Thanks very much

John
Was This Post Helpful? 0
  • +
  • -

#4 Nightfish  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 73
  • View blog
  • Posts: 158
  • Joined: 24-May 11

Re: datagrid view control double click on a cell

Posted 08 June 2011 - 11:32 PM

No problem. I'm still no expert in vb.net myself but I'm happy to share what little I know. If you're stuck somewhere, just post again. :)

I'm not sure how you're going about this exactly and how experienced you are, but if you're doing a windows forms application in visual studio you can just go and double click stuff - the gridview in this case - in the designer and it'll automatically generate a bit of code to get you started (similar to what I posted, except it'll probably be a regular click event instead of a double click event, but you can adapt that then. This is probably old news to everyone, but until recently I was programming in emacs (don't ask) and all this automatic stuff is kinda o.O to me.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1