简体   繁体   中英

export listview as a table in PDF form

How can I export all of the items in my listview including the column header into a PDF form?

I have already looked at this example but I have no idea where did the cellExport1 came from and why is the oleDbConnection1.Open(); was required when the items is already present in the listview.

I already tried posting on their forums and its been 3 days already and no one seems to have replied so I was hoping I could find answers here.

The oleDbConnection1.Open(); was still there since it is necessary to access the database regardless of the items being present in your listview, to trigger this activity you'll need to click your assigned button, that's why you'll notice that oleDbConnection1.Open(); is under the protected void Button1_Click(object sender, System.EventArgs e) method.

Now the cellExport1 I suppose contains the cells in your lisview which are to be saved in a PDF file

Hope I was able to clarify things to you!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM