Export Selected Rows in RadGridView
Environment
Product Version | Product | Author |
---|---|---|
2023.2.606 | RadGridView for WinForms | Dinko Krastev |
Description
A common requirement is to export only the selected rows in RadGridView. This article shows how to achieve this functionality. The GridViewSpreadExport exposes a HiddenRowOption property which determines whether to export hidden rows. We can use this option for our scenario.
Solution
To achieve this functionality, you can first set the HiddenRowOption to ignore exporting hidden rows (HiddenOption.DoNotExport). Then you can hide the unselected rows before exporting. After the RadGridView control is exported, you can show the rows again.