By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,864 Members | 1,324 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,864 IT Pros & Developers. It's quick & easy.

How to use cellclick event for datagridview in c# in vs2005?

P: 12
Hi to All,
How to use mouse click event for datagridview in c# in vs2005?
I m using datagridview in c# application.I had bound data in datagridview.I want to display data in textbox when i click on appropriate row of the datagridview.Grid has only one event "cellcontentclick" is displayed.But i want to use "cellclick" or "selectionchanged" event of datagridview.
So plz help me...How to do this....?
Thax in advance.......
Nov 21 '08 #1
Share this Question
Share on Google+
2 Replies

P: 40
What are you talking about? DataGridView has lots of events for clicks, at least:
  • CellClick
  • CellContentClick
  • CellContentDoubleClick
  • CellDoubleClick
  • CellMouseClick
  • CellMouseDoubleClick

I don't know the difference between CellClick and CellMouseClick other than with CellMouseClick you can check the mouse button the click was made. CellContentClick tells that the click was on the content (i.e. the text), not on the empty space around it.
Nov 21 '08 #2

P: 12
I want to get data in textbox when i click on cell of datagridview.It may be any event Cellclick or Mouseclick.Bcoz there is only one event displayed in the application. So how to use another event in C# application?
So plz help me....
Nov 21 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.