Results 1 to 6 of 6

Thread: [RESOLVED] Simulate DataGrid cell double click

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    97

    Resolved [RESOLVED] Simulate DataGrid cell double click

    Hello! (VS 2005).

    I'm trying to enter cell from a button click , like simulate DataGrid cell double click.

    Thank You
    Last edited by BorisAro; May 10th, 2007 at 05:11 AM. Reason: Fault

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Simulate DataGrid cell double click

    Are you sure it's a DataGrid, or is it a DataGridView? If it IS a DataGrid I would question you're using it when the DataGridView is better in almost every respect.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    97

    Re: Simulate DataGrid cell double click

    It is a DataGridView.

  4. #4
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Simulate DataGrid cell double click

    Quote Originally Posted by BorisAro
    It is a DataGridView.
    Hi,

    You could use this:

    Code:
    Private Sub DataGridView1_CellContentDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentDoubleClick
        ' put here your code
        End Sub
    Hope it helps,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    97

    Re: Simulate DataGrid cell double click

    Seems I was misunderstood.

    I got a form with a DataGridView and a couple of buttons.
    I'd like to click one of the buttons, and then simulate as if a particular cell has been double clicked, i.e. simulate start enter text into this cell.

    Thank You

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    97

    Re: Simulate DataGrid cell double click

    I discovered:

    Me.DataGridView2.BeginEdit(False)
    works fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width