mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
3.94k stars 1.21k forks source link

[data grid] CSV-Export - Include a structural character for treedata #11772

Open GeiOoo opened 6 months ago

GeiOoo commented 6 months ago

Summary

It should be possible to define a property in GridCsvExportOptions to visualize the structor of the treedata. Currently its not possible to show the different levels of data in the csv export.

Examples

image This Grid would result in a csv-export:

Group;Job Title;Recruitment Date;
Sarah;Head of Human Resources;12.9.2020;
Thomas (1);Head of Sales;4.4.2017;
Robert;Sales Person;20.12.2020;
Mary (1);Head of Engineering;14.4.2016;
Jennifer;Tech lead front;17.6.2016;
David;Tech lead front;17.6.2016;

With a - defined as structureal character the csv-export could be something like this:

Group;Job Title;Recruitment Date;
Sarah;Head of Human Resources;12.9.2020;
Thomas (1);Head of Sales;4.4.2017;
-Robert;Sales Person;20.12.2020;
Mary (1);Head of Engineering;14.4.2016;
-Jennifer;Tech lead front;17.6.2016;
--David;Tech lead front;17.6.2016;

Motivation

I want to visualize the treedata structur inside the csv export. This is especially important when implementing summery-values for the group-rows. It is important to differentiate between a group-row and a data-row.

Search keywords: datagrid treedata csv export group

michelengelen commented 5 months ago

Thanks @GeiOoo for raising this. I have put this on our board for the team to look at!