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
- //Creating iTextSharp Table from the DataTable data
- //Console.WriteLine(kifDataGridView.ColumnCount); test za itext sharp
- 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);
- //Adding Header row
- 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);
- }
- //Adding DataRow
- 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);
- }
- }
Ravi SangtaniPosted Jun 4, 2018, 5:27 AM
Ravi SangtaniPosted Jun 6, 2018, 11:15 AM
Goran BibicPosted Jun 6, 2018, 3:56 AM
Ravi SangtaniPosted Jun 6, 2018, 3:34 AM
Goran BibicPosted Jun 5, 2018, 2:42 PM
Goran BibicPosted Jun 5, 2018, 1:05 PM
Ravi SangtaniPosted Jun 5, 2018, 10:34 AM