Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: PDF itextsharp
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;
 

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 5-Jul-13 8:24am
EthemX133

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

  Print Answers RSS
0 OriginalGriff 490
1 Maciej Los 305
2 Richard MacCutchan 270
3 Mathew Soji 220
4 BillWoodruff 210
0 OriginalGriff 8,834
1 Sergey Alexandrovich Kryukov 7,477
2 DamithSL 5,689
3 Maciej Los 5,329
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web03 | 2.8.1411028.1 | Last Updated 5 Jul 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100