Results 1 to 6 of 6

Thread: [RESOLVED] DataGridView searching

Threaded View

  1. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2009
    Posts
    124

    Re: DataGridView searching

    I'm using this code:

    Code:
        Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
            Dim matchRowdwID = (From dgvRow In DataGridView1.Rows Let r = DirectCast(dgvRow, DataGridViewRow) Where Not (r.IsNewRow AndAlso r.Cells("szName").Value.ToString = TextBox1.Text) Select r.Cells("//dwID").Value).ToArray
            If matchRowdwID.Count > 0 Then MsgBox(matchRowdwID.First.ToString)
        End Sub
    But it always shows the first match in //dwID
    Last edited by TooLongName; Jul 31st, 2010 at 08:52 AM.
    RATE MY POST

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