Dec 07, 2010 12:11 PM|CodingMB|LINK
I am currently struggling with the following task.
I have a common Linq/DD project, a simple SQL DB frontend with only 2 linked tables. I also injected custom filters but everything else ist quite default (no custom pages etc.). Everything looks good so far and the filtering works like a charm. What I am
now trying to achieve is the export of the filtered data to a csv file. For this I found a LINQ2CSV class that also works quite well and I have tested it with normal LINQ queries, no problem.
The problem starts when I am trying to find a way to get the full (unpaged) data or the query that is the source of the currently displayed data in the gridview. Filtering is done by QueryExtender, DynamicFilterExpression and QueryableFilterRepeater (all
default) and it is sooooo dynamic that I am not able to find en entry point where i could get my desired data. I have already tried:
GridDataSource_Selected: paged data (but full filtered result count)
GridDataSource_Selecting: empty (only arguments like page size)
GridDataSource_QueryCreated: unfiltered data
I also had a look at the other controls and their events but nowhere is a sign of any query string or where parameters at all.
Has someone an idea where I could get either the complete filtered data (IEnumerator, List, whatever) or is there another/better way to export the full filtered data currently display in a gridview (without the need of defining table specific values, I
would like to keep it as dynamic as possible so I can expand the project without to much effort).
Export to Excel