Discussion
STC
IN
Last activity: 11 Nov 2025 7:12 EST
Export Excel on Filtered Values in UI Grid - UI Kit
In UI-Kit table grids, the user’s applied filters are not carried forward when exporting to Excel. This capability exists in Constellation, but UI-Kit does not support it OOTB.
We implemented a workaround to enable Excel export with applied filters in UI-Kit.
How we achieved it
Whenever a user applies filters on a UI-Kit grid, Pega automatically generates a GridMetaData page. This page contains the client-side metadata, including a unique ID and a list of columns with their filter details.
Using this behavior:
-
Capture the GridMetaData page
We copied the GridMetaData instance and extracted the pyColumns entries that had the filter flag enabled. -
Build a filtered Page List
From the original data source, we created a new Page List that included only the records matching the filtered column values retrieved from GridMetaData. -
Refresh the grid with filtered results
On grid refresh, we replaced the data source with the filtered Page List to ensure the UI reflects only the filtered data. -
Invoke the OOTB Excel Export activity
The filtered Page List was passed to the standard Export to Excel activity.
As a result, the generated Excel file contains only the filtered rows—matching the user’s UI view.
This approach allows UI-Kit applications to achieve Excel export with applied filters, similar to Constellation.
Happy Learning!