Queries |
Response | |
“Pass the filtered data to web api controller”
|
We cannot use the ajaxPost for exporting the grid. So, if you need to pass the filtered data to the web api controller, we can do this by adding the additional parameter to the grid model and retrieving it at the server side.
In the button click of exportGrid, using getFilteredRecords method we send the filteredRecords along with the grid model and retrieve at the server side.
Find the code example and sample:
| |
“ i can't see in the sample you provided where you assign the filteredColumns to export”
|
After we filter the grid the filtered column details will be stored on the filterColumns property of the gridmodel. While exporting we will pass the gridmodel as a parameter in export method.
Find the code example:
Using that gridmodel the grid data will be automatically filtered in the export method and it exports only the filtered data.
|
ej.raiseWebFormsServerEvents | @ | ScriptResource.axd?d=Lidm5jiJWmiEo2pk-0DiwPoTyd2n9SWN11xS-UNqLNggw51VQhvSoqn-qDBnq5UpmhuPeB0PK5QnOL…:10 |
export | @ | ej.web.all.min.js:10 |