0

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..:-)

Edited by Reverend Jim: typo

2
Contributors
1
Reply
12
Views
3 Years
Discussion Span
Last Post by ravikash123
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.