问题
I'm looking for a solution to implement in web apps where I have the option to see a print preview or print either a gridview, datagrid, or datatable or export it to word or excel. What's the best method to do this or has someone written a class that does this, and does it well (I've seen many examples, but many still have errors)?
回答1:
Perhaps you could look into converting your DataTable's to Table's in HTML then using the resources for setting up Media types to format it for a print job. Thought behind this response would be this link:
http://www.dreamincode.net/forums/topic/17049-printing-in-html/
来源:https://stackoverflow.com/questions/3858782/print-gridviews-datagrids-or-datatables