Some help
Sql column type is date
datagrid setup preview 19.09.2017
Datetimepicker format short value 19.09.2017
I need column date 19.09.2017 00:00:00 setup just date 19.09.2017
-
-
- PdfPTable pdfTable = new PdfPTable(kifDataGridView.ColumnCount);
- pdfTable.DefaultCell.Padding = 3;
- pdfTable.WidthPercentage = 100;
- pdfTable.HorizontalAlignment = Element.ALIGN_LEFT;
- pdfTable.DefaultCell.BorderWidth = 1;
-
- float[] sirina = new float[] { 0f, 15f, 40f, 70f, 80f, 0f, 0f, 0f, 0f, 0f, 45f, 40f, 30f, 45f, 45f, 40f, 30f, 25f, 25f, 40f, 30f };
- pdfTable.SetWidths(sirina);
- BaseFont bfCalibri = BaseFont.CreateFont("c:\\windows\\fonts\\calibri.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
- iTextSharp.text.Font calibri = new iTextSharp.text.Font(bfCalibri, 8);
- iTextSharp.text.Font calibri2 = new iTextSharp.text.Font(bfCalibri, 7, iTextSharp.text.Font.NORMAL, iTextSharp.text.BaseColor.WHITE);
-
-
-
-
- foreach (DataGridViewColumn column in kifDataGridView.Columns)
- {
- PdfPCell cell = new PdfPCell(new Phrase(column.HeaderText, calibri2));
- cell.BackgroundColor = new iTextSharp.text.BaseColor(243,70,5);
- pdfTable.AddCell(cell);
- }
-
-
- foreach (DataGridViewRow row in kifDataGridView.Rows)
- {
-
- foreach (DataGridViewCell cell in row.Cells)
- {
-
- PdfPCell cell2 = new PdfPCell(new Phrase(cell.Value.ToString(), calibri));
- pdfTable.AddCell(cell2);
- }
- }