Skip to main content
Inspiring
June 24, 2024
Question

Hide grid columns in excel export

  • June 24, 2024
  • 3 replies
  • 0 views

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.

3 replies

venkatrea696188
June 24, 2024

It's gonna Export everything that's on grid ,So we need to conditionally hide those columns before exporting

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

shubhama926776
Brainy
June 24, 2024

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.

शुभम्
konduruc733182
June 24, 2024

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.