I have a grid that includes the Export to Excel functionality.
I retrieve the grid options via getOptions() and store them to local storage so that I may later restore those settings by using setOptions(). The Export to Excel button is not being displayed after I call setOptions() so I'm assuming this is something I need to manually add to the configuration. However, I'm having a hard time coming up with the syntax. How do I do this?
The relevant configuration of the grid looks like this:
.ToolBar(tools => tools.Excel())
.Excel(excel => excel
.AllPages(true)
.FileName("Applications.xlsx")
.Filterable(true)
.ProxyURL(Url.Action("Excel_Export_Save", "Application"))
)
Code to populate the grid options looks like this:
var
options = JSON.parse(gridOptions);
// Now that I have the options how do I add the Excel settings I defined on the
// grid above before calling setOptions()?
grid.setOptions(options);