I have an interesting problem and have been unable to find any code examples for it. BTW i am using visual Studio 2005.
I have an unbound DataGridView that I populate with information (WMI Type) from a number of functions and Subs. I would like to be able to check the checkbox next to the item and when I click the button it will give me the text in the column to the left as shown.
I would think I need to either loop through the rows but am not sure at all... I am completely stumped on this one.
I have tried a lot of code in examples I have found but to no avail. my vurrent code looks like this .. (Just giving me teh word "test")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Me.DataGridView2.SelectedRows.Count > 0 AndAlso _
Not Me.DataGridView2.SelectedRows(0).Index = _
Me.DataGridView2.Rows.Count - 1 Then
Me.TextBox1.Text = "test"
End If
End Sub
Any Help would be appriceated.
I have an unbound DataGridView that I populate with information (WMI Type) from a number of functions and Subs. I would like to be able to check the checkbox next to the item and when I click the button it will give me the text in the column to the left as shown.
I would think I need to either loop through the rows but am not sure at all... I am completely stumped on this one.
I have tried a lot of code in examples I have found but to no avail. my vurrent code looks like this .. (Just giving me teh word "test")
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Me.DataGridView2.SelectedRows.Count > 0 AndAlso _
Not Me.DataGridView2.SelectedRows(0).Index = _
Me.DataGridView2.Rows.Count - 1 Then
Me.TextBox1.Text = "test"
End If
End Sub
Any Help would be appriceated.