Don't work from a DataGridView directly - use it's data source instead, which is often a DataTable loaded from a DB or file. That way, you separate the presentation details from the data storage and get more reusable code.
And you can then use standard packages which can load / save data to CSV for you (or switch to XML / JSON for a more "modern" human readable data store when you decide to upgrade).
I use this:
CsvHelper[
^]