I have a hierarchical Radgrid
Batch...
Adjustments...
Comments
I have the functionality of export to excel on the 'Adjustments' grid. How can I prevent the export of the 'Comments' grid if the user clicks Export when Comments are expanded?
Batch...
Adjustments...
Comments
I have the functionality of export to excel on the 'Adjustments' grid. How can I prevent the export of the 'Comments' grid if the user clicks Export when Comments are expanded?
protected void ConfigureExport(object source, GridCommandEventArgs e) { e.Item.OwnerTableView.GetColumn("PolicyEditRecord").Visible = false; e.Item.OwnerTableView.GetColumn("DeleteTransaction").Visible = false; e.Item.OwnerTableView.GetColumn("ManualAdjustmentBatchID").Visible = false; e.Item.OwnerTableView.GetColumn("ManualAdjustmentID").Visible = false; ((RadGrid)source).ExportSettings.ExportOnlyData = true; ((RadGrid)source).ExportSettings.IgnorePaging = true; ((RadGrid)source).ExportSettings.OpenInNewWindow = false; ((RadGrid)source).ExportSettings.HideStructureColumns = true; ((RadGrid)source).MasterTableView.HierarchyDefaultExpanded = false; ((RadGrid)source).MasterTableView.ExportToExcel(); }