Пример #1
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0 & e.ColumnIndex >= 0)
     {
         DataGridViewCell cell = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];
         if (cell.Style.ForeColor == Color.Blue)
         {
             List <FileInfo> fileList = (List <FileInfo>)cell.Tag;
             ShowImagesForm  imgForm  = new ShowImagesForm(fileList, cell.Value.ToString());
             imgForm.ShowDialog();
         }
     }
 }
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex > -1 & e.ColumnIndex > -1)
     {
         DataGridViewCell cell = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];
         if (cell.OwningColumn.Name == "Zdjecia" & cell.Tag != null)
         {
             string          lot     = dataGridView1.Rows[e.RowIndex].Cells["LOT"].Value.ToString();
             List <FileInfo> imgList = (List <FileInfo>)cell.Tag;
             ShowImagesForm  imgForm = new ShowImagesForm(imgList, $"LOT: {lot}");
             imgForm.ShowDialog();
         }
     }
 }