Guest User

Untitled

a guest
Jan 18th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. dataGridView1.Rows.Add( ) ;
  2.  
  3. dataGridView1.Columns.Add("columnName1", "Column 1 Header");
  4. dataGridView1.Columns.Add("columnName2", "Column 2 Header");
  5.  
  6. var row1 = new DataGridViewRow();
  7. row1.Cells.Add(new DataGridViewImageCell { Value = new Bitmap(@"C:Pathtoimage.jpg") });
  8. row1.Cells.Add(new DataGridViewTextBoxCell { Value = "string" });
  9. dataGridView1.Rows.Add(row1);
  10.  
  11. var row2 = new DataGridViewRow();
  12. row2.Cells.Add(new DataGridViewTextBoxCell { Value = "string"});
  13. row2.Cells.Add(new DataGridViewImageCell { Value = new Bitmap(@"C:Pathtoimage.jpg") });
  14. dataGridView1.Rows.Add(row2);
Add Comment
Please, Sign In to add comment