Hi Guys:-) I hope everyone is doing great:-)

I Have a Question..

How to Display Selected Data in a DataGridView using it's own events??

This is my Code..

Public Class From1
    Private Sub frmTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ChildNameTableAdapter.Fill(TestDataSet.ChildName)
    End Sub

    Private Sub DisplayButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayButton.Click
        Dim i As Integer

        For i = 0 To ChildNameDataGridView.RowCount - 1
            If (ChildNameDataGridView.Rows(i).Cells(1).Value).chars(0) = "R" Or (ChildNameDataGridView.Rows(i).Cells(1).Value).chars(0) = "r" Then
                MsgBox(ChildNameDataGridView.Rows(i).Cells(1).Value)
            End If
        Next
    End Sub 
End Class

I already display my selected data, but i can't make it display in the datagridView....
Help me...Thanks..:-)

Hi ReyJEnriquez,

for this you need to insert a row in the data source dataset then rebind the grid then the data will be show in grid view..

Regards..
Ravikash

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.