Goran Bibic

Goran Bibic

  • 484
  • 2.9k
  • 196.7k

Multiple datetime from datagrid itextsharp PDF c#

Sep 20 2018 1:59 AM
I have solution and work fine
 
I need in line 7 to add multiple columns with date and time...some help?
  1. //Adding DataRow  
  2.             foreach (DataGridViewRow row in mp_racun_listaDataGridView.Rows)  
  3.             {  
  4.                 int c = 0;  
  5.                 foreach (DataGridViewCell cell in row.Cells)  
  6.                 {  
  7.                     if (c == 2)  
  8.                     {  
  9.                         PdfPCell cell2 = new PdfPCell(new Phrase(cell.Value.ToString().Split(' ')[0], calibri));  
  10.                         pdfTable.AddCell(cell2);  
  11.                     }  
  12.                     else  
  13.                     {  
  14.                         PdfPCell cell2 = new PdfPCell(new Phrase(cell.Value.ToString(), calibri));  
  15.                         pdfTable.AddCell(cell2);  
  16.                     }  
  17.                     c++;  
  18.                 }  
  19.             } 
 
 
 

Answers (2)