Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a data to my gridview. And convert to my gridview values to pdf, but i have a problem. I make to gridview format currency and my currency values are see the gridview. But i make the pdf not show gridview's currency values. Code is there;


C#
this.dataGridView1.Columns["Borç Tutari"].DefaultCellStyle.Format = "c";
PdfPTable pdftablosu = new PdfPTable(dataGridView1.Columns.Count);
            PdfPCell cell = new PdfPCell(new Phrase(cmbAracSube.Text + " NUMARALI ARAÇ/SUBE RAPORLARI", new iTextSharp.text.Font(iTextSharp.text.Font.FontFamily.COURIER, 12f, iTextSharp.text.Font.BOLDITALIC, iTextSharp.text.BaseColor.RED)));
            cell.Colspan = 5;
            cell.HorizontalAlignment = 1;
            pdftablosu.AddCell(cell);
            for (int j = 0; j < dataGridView1.Columns.Count; j++)
            { pdftablosu.AddCell(new Phrase(dataGridView1.Columns[j].HeaderText, new iTextSharp.text.Font(iTextSharp.text.Font.NORMAL, 8f, iTextSharp.text.Font.NORMAL,iTextSharp.text.BaseColor.BLUE))); }
            pdftablosu.HeaderRows = 1;

            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                for (int k = 0; k < dataGridView1.Columns.Count; k++)
                {
                    if (dataGridView1[k, i].Value != null)
                    {
                        pdftablosu.AddCell(new Phrase(dataGridView1[k, i].Value.ToString())); 
                    }
                }
            } 


How am i do to see pdf currecy values?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900