locked
How do I export the current DataSet bound to a Gridview to Excel? RRS feed

  • Question

  • User-544808552 posted

    I have a GridView populated by an ObjectDataSource.  I also have several DropDownLists filtering the ObjectDataSource.  I found a link providing a way to export a DataSet (or DataTable) to Excel here:

    http://msmvps.com/blogs/deborahk/archive/2009/07/23/writing-data-from-a-datatable-to-excel.aspx

    I want to know how I can ensure that filters applied to the ObjectDataSource when the method is called are applied.  In short, how can I ensure what the UI is displaying is what the file will include when exported?

    Friday, March 11, 2011 9:37 PM

All replies