Last post Oct 09, 2012 05:27 AM by tanujad
Oct 09, 2012 03:45 AM|MC Choong|LINK
I am exporting gridview into excel.
I want to limit the data shown by adjusting the date (from which date to which date). I need to adjust the date at the webpage before exporting it to excel.
For an example, i want to show the data from 1st Oct 2012 to 31st Oct 2012 in excel. Before that i have to adjust the date at the webpage.
Anyone can give me a simple example for it? Thanks.
Oct 09, 2012 03:52 AM|tanujad|LINK
To filter out the data at the webpage according to date, place 2 datepickers above the grid and select the From and To date range in the respective datepickers.
Based on that date range populate the gridview and then export the gridview to excel.
Oct 09, 2012 04:23 AM|MC Choong|LINK
Actually i need to show all data in the gridview and only show certain data from certain date to certain date in the excel.
Isit possible to do so???
Oct 09, 2012 04:50 AM|MC Choong|LINK
Btw, can u give me a simple example of modifying the gridview by a button click so that the gridview only shows the data within the date of datepickers?
Oct 09, 2012 05:27 AM|tanujad|LINK
You can have 1 button (say Search) on button click of that event you can have 2 datepickers. on entering that date the gridview will get updated as per the date range and accordingly exported to excel.
At the same time you can have another button say Show All, on that button click event your gridview will show all the data (i.e. not in any date range).