Posted 12 April 2024, 7:43 am EST
I am using the FlexGrid component in a React site. My FlexGrid uses a modified example that I found to allow it to use my OData endpoints. It loads a single page of data and then when the user changes the page, the sorting, or the filtering, it loads the new page. I was unable to understand (or get working) the default ODataCollectionView with my .net core odata endpoints. I have attached this file in case it is relevant.
I instantiate the data source for the grid like this:
new RestCollectionViewOData(
dataUrl,
setIsLoading,
{
requestHeaders: {
Authorization: `Bearer ${token}`,
},
pageSize,
pageOnServer: true,
sortOnServer: true,
filterOnServer: true,
})
I am exporting to Xlsx using this function during a custom button click:
FlexGridXlsxConverter.saveAsync(gridRef.current, {
includeColumnHeaders: true,
includeStyles: false,
}, `${gridId}_Grid_Exported.xlsx`)
When the data is exported, it only exports the current page of data. What I’d like to do is export ALL of the pages of data in 1 giant set, while still respecting the user’s applied sorting, filtering, and chosen columns.
What is your suggestion for doing this?