A
Avi R
Hi,
I'm trying to insert tictureBox in Datagrid I use the next code :
System.Windows.Forms.DataGrid datagrid1; //my datagrid
DataGridTextBoxColumn datagridtextBox; //to add my picture box
//Take the text box from the second column of the grid where I will be
adding the controls (PictureBox)
datagridtextBox = (DataGridTextBoxColumn)datagrid1.TableStyles[0].GridColumnStyles[1];
//to add my pictureBox in datagridtextBox (second column in my
datagrid)
for(int i = 0 ;i < dataTable.Rows.Count ; i++)
{
datagridtextBox.TextBox.Controls.Add(pct);
pct.BringToFront();
}
that work fine but the picture box appeare only when i click on the
cell.
If someone know what i can do to show the picture box when loading the
datagrid without click,
please let me know.
Thanks
Avi
I'm trying to insert tictureBox in Datagrid I use the next code :
System.Windows.Forms.DataGrid datagrid1; //my datagrid
DataGridTextBoxColumn datagridtextBox; //to add my picture box
//Take the text box from the second column of the grid where I will be
adding the controls (PictureBox)
datagridtextBox = (DataGridTextBoxColumn)datagrid1.TableStyles[0].GridColumnStyles[1];
//to add my pictureBox in datagridtextBox (second column in my
datagrid)
for(int i = 0 ;i < dataTable.Rows.Count ; i++)
{
datagridtextBox.TextBox.Controls.Add(pct);
pct.BringToFront();
}
that work fine but the picture box appeare only when i click on the
cell.
If someone know what i can do to show the picture box when loading the
datagrid without click,
please let me know.
Thanks
Avi