How does one go about exporting data from the grid, after the user sets a filter?
Currently the export ,exports the dataset and not the filtered / selected dataset.
Scott | |
How does one go about exporting data from the grid, after the user sets a filter?
Currently the export ,exports the dataset and not the filtered / selected dataset.
Posted Aug 6, 2015
Kool
|
|
David | |
Hi Scott,
I think that current export does only the filtered data. Please have a look and try some at this demo: http://demo.koolphp.net/Examples/KoolGrid/Exporting/Excel_Word_CSV_PDF/index.php The example's code is below the page. You could compare it with yours to see if there's any difference that may cause a problem. Rgds,
Posted Aug 7, 2015
Kool
|
|
Scott | |
Yes the current online demo, does export only the filtered data.
Looks like will need to update to a newer version. Thanks.
Posted Aug 7, 2015
Kool
|
|
Scott | |
Updated my test system to the current version of KoolControls.
Know I have the current version running, due to needing to do a couple of PHP updates for this version to render the grid. Tried to filer and export, but still get all data ( that being all the data on screen prior to the filter). What little gotcha's might there be?
Posted Aug 26, 2015
Kool
|
|
Scott | |
Online Documentation of the example is stale.
What is NOT present is a little line... $grid->KeepViewSessionInState=true; Add this then, we are running OK. Found this answer through back a backdoor link to the old forum and that resolution had a typo.
Posted Aug 26, 2015
Kool - 1 person likes this post
|
|
David | |
Thanks Scott, for your spot!
Basically, filters are parts of a grid's viewstate. To keep a viewstate persistent we have to use one of the following ways: 1. Set $grid->AjaxEnabled = true; or: 2. Put $grid->Render() method inside a <form>...</form> tag. or: 3. Set $grid->KeepViewSessionInState=true; Rgds,
Posted Aug 27, 2015
Kool - 1 person likes this post
|
|