I have created a datagrid, the first column ID was set to DataGridViewButtonColumn, so in the column ID there is a button with an ID (ez Joe) in the field. I also have a picturebox1 and a seperate textbox1
In the Private Sub DataGridView1_CellContentClick I wrote the following
Therefore when I write Joe in a seperate textbox and press the button in the datagridview Joe's image shows up in a seperate picturebox
I have tried
So that when I press the button with ID Joe on it the picture shows up in PictureBox1. Instead of writing ID Joe in a seperate textbox. But it does not work.
What am I doing wrong. I am using VS2005
Thanks in advance for your help.
In the Private Sub DataGridView1_CellContentClick I wrote the following
PictureBox1.Image = Image.FromFile("C:\Users\Simon\Desktop\" + TextBox1.Text + ".jpg")
Therefore when I write Joe in a seperate textbox and press the button in the datagridview Joe's image shows up in a seperate picturebox
I have tried
PictureBox1.Image = Image.FromFile("C:\Users\Simon\Desktop\" + PartNoDataGridViewTextBoxColumn.text + ".jpg")
So that when I press the button with ID Joe on it the picture shows up in PictureBox1. Instead of writing ID Joe in a seperate textbox. But it does not work.
What am I doing wrong. I am using VS2005
Thanks in advance for your help.