-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
BugC: GridFP: CompletedSync status with associated Feedback ItemSync status with associated Feedback ItemRegressionBroken functionality which was working previouslyBroken functionality which was working previouslyS: Wrappers (ASP.NET Core)S: Wrappers (ASP.NET MVC)SEV: High
Milestone
Description
Bug report
Grid Hidden Column is set as exportable by default for Pdf and Excel
Reproduction of the problem
- Set a Column as hidden through the Hidden() API configuration.
- Add both the ToolBar.Excel() and ToolBar.Pdf() API configurations.
- Notice, that the hidden column is exported.
Current behavior
The Grid Hidden Column is set as exportable by default for Pdf and Excel.
Expected/desired behavior
The Grid Hidden Column should NOT be set as exportable by default for Pdf and Excel.
Workarounds
If you wish to set the hidden columns as non-exportable on a global scale, then a possible recommendation would be handle the DataBound event of the Grid and add the following layer of logic:
.Events(events => events.DataBound("onDataBound"))
<script>
function onDataBound(e){
var columns = e.sender.columns.filter(column => {
return column.hidden == true;
}).forEach(column => column.exportable = false);
}
</script>
If you wish to set the exportable state of the hidden columns granularly, a possible recommendation would be use the Columns.Bound.Exportable() API configuration.
.Columns(columns =>
{
columns.Bound(p => p.Freight).Hidden(true).Exportable(false);
columns.Bound(p => p.OrderDate);
})
Environment
- Kendo UI version: 2024.3.806
- Browser: all
Metadata
Metadata
Assignees
Labels
BugC: GridFP: CompletedSync status with associated Feedback ItemSync status with associated Feedback ItemRegressionBroken functionality which was working previouslyBroken functionality which was working previouslyS: Wrappers (ASP.NET Core)S: Wrappers (ASP.NET MVC)SEV: High