Hi all,
We are using a read-only grid to display data from a record and have the Export to Excel option available. The problem we are facing is that the Excel also includes the Edit and Delete Row columns which we added to the grid to add these functionalities to the interface.
Does anyone know if we can select the columns we want to be included in Excel or how to delete these two columns?
Thanks in advance.
Discussion posts and replies are publicly visible
It's gonna Export everything that's on grid ,So we need to conditionally hide those columns before exporting
Patricia said:Does anyone know if we can select the columns we want to be included in Excel or how to delete these two columns?
You need to design it using Checkboxes and Showwhen parameter of grid column
I'm not sure how exactly this approach would work for your specific situation, but I'd recommend trying it if it meets your requirements.You can add a button(Ready for Export). Clicking this button would hide the edit and delete columns. Additionally, it would temporarily enable grid functionality for exporting data and then hide the "show export" button. This way, the user wouldn't see the unwanted columns in the exported file.
Have a button which would save a Boolean value to a local variable. this local variable defines the value for showWhen parameters of the grid columns and the showExportButton of the grid.