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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hnpatel
    New Member
    • Jan 2008
    • 12

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

    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.Gr id has only one event "cellcontentcli ck" is displayed.But i want to use "cellclick" or "selectionchang ed" event of datagridview.
    So plz help me...How to do this....?
    Thax in advance.......
  • artov
    New Member
    • Jul 2008
    • 40

    #2
    What are you talking about? DataGridView has lots of events for clicks, at least:
    • CellClick
    • CellContentClic k
    • CellContentDoub leClick
    • CellDoubleClick
    • CellMouseClick
    • CellMouseDouble Click


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

    Comment

    • hnpatel
      New Member
      • Jan 2008
      • 12

      #3
      Hi,
      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....

      Comment

      Working...