Hello Everybody :)
I ran into a small problem continue writing my code.
What i try to do...
I have 2 forms.
Form2 contain a DataGridView, Where i want if i select a Row, to display on Form1, a specific table from other DB + a Picture in a PictureBox.
My code:
Private Sub DataGridView1_RowHeaderMouseClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView1.RowHeaderMouseClick
For Each cell As DataGridViewCell In DataGridView1.SelectedCells
If cell.FormattedValue.Contains("Apple") Then
form1.PictureBox1.ImageLocation = "C:\...\apple-logo.jpg"
ElseIf cell.FormattedValue.Contains("Samsung") Then
Me.PictureBox1.ImageLocation = "C:\...\samsung-logo.jpg"
End If
Next
End Sub
End Class
Well when i did with a Combobox, and on the same form:
with this code:
Private Sub ComboBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Select Case ComboBox1.SelectedItem
Case "Apple" : table = "Apple"
Case "Samsung" : table = "Samsungs"
Case "other" : table = "All"
End Sub
But now i want to make from the DatagridView on form2, when i select a row and that row contain Apple or Samsung or other, to open in Form1 the picture + the Table in the form1.datagridView1
How can i realize that?
No more idea how can i do it...
Maybe it's like that?
If cell.FormattedValue.Contains("ABC") Then
Form1.PictureBox1.Image = My.Resources.cover
Form1.TableAdapterManager.updateAll(form1.AppDataSet)
Thanks guys..