Last post Feb 03, 2017 02:26 AM by Eric Du
Feb 02, 2017 04:43 AM|Alamdreal1|LINK
Hello, I have tried exporting to gridview and its not exporting the right result to pdf and excel.
every time I filter the grid and export the filtered grid to pdf it loads all the data set I mean all the datas in the database.
Please can I get a help on this.
Thanks for you help.
Feb 02, 2017 06:24 AM|kaushalparik27|LINK
It is quite possible that Filter logic is not working, which in turn making all data set to export in PDF and Excel. I suggest to either check Filter logic or use Custom Paging/Filteration on SQL Server side to only fetch data and bind to Grid which you
want to actually export to PDF and Excel.
hope that helps./.
Feb 03, 2017 02:26 AM|Eric Du|LINK
According to your description, as far as I know, when you select value in dropdownlist, it will send selected value to select command, it will return data, then bind data to GridView.
Here is a article about how to populate data based on selected value in dropdownlist:
Export GridView To Word Excel PDF CSV Formats in ASP.Net:
So I think the exported data is returned data, I hope you can add a break point, check the returned data.
Also need check exported data is the GridView data source or not.