Export to PDF from Grid View. [Resolved]

Posted by Naveenmanam under ASP.NET on 4/29/2010 | Views : 2199 | Status : [Member] | Replies : 1
Hi,

How to Export to PDF from Grid View....?

NaveenKumar


Responses

Posted by: Naveenmanam on: 4/29/2010 [Member] Starter

Up
0
Down

Resolved
i got the answer friends any inewant the answer.


One of the previous articles we demonstrated how to export a GridView to excel. In this article we will demonstrate how to export GridView to PDF format using the ITextSharp library.
Hear main code:


private void BindData()
04 {
05 gvCustomers.DataSource = GetCustomers();
06 gvCustomers.DataBind();
07 }
08
09 private List<Customer> GetCustomers()
10 {
11 List<Customer> customers = new List<Customer>();
12
13 for (int i = 1; i <= 20; i++)
14 {
15 Customer customer = new Customer();
16 customer.FirstName = "FirstName" + i;
17 customer.LastName = "LastName" + i;
18 customer.Email = "Email" + i;
19 customers.Add(customer);
20 }
21
22 return customers;
23 }


see link:http://www.aspsnippets.com/Search.aspx?q=how+to+export+to+pdf+from+gridview....%3f

NaveenKumar

Naveenmanam, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response