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/
4.11k stars 1.27k forks source link

[DataGridPro] Summary Row #1999

Open sagiBarkol opened 3 years ago

sagiBarkol commented 3 years ago

Summary Row

Summary 💡

add a summary row that shows the sum of all or chosen row-column (for example: amount column)

Examples 🌈

Motivation 🔦

I have order reports and I need to know the sum of all the orders amount

dtassone commented 3 years ago

You could customize the footer to do that https://material-ui.com/components/data-grid/components/#footer

sagiBarkol commented 3 years ago

You could customize the footer to do that https://material-ui.com/components/data-grid/components/#footer

thanks! but it's kinda annoying that I don't get the records on the bulkAction callback, that's mean that I need to call the dataProvider for the "amount" for every checked record. any idea how I can avoid it?

oliviertassinari commented 2 years ago

I would note that this feature likely depends on #208. It's also a bit related to #2795.

Here2Huynh commented 3 months ago

You could customize the footer to do that https://material-ui.com/components/data-grid/components/#footer

I am currently using this approach to show a summary row. The only problem I am running into is that footer horizontal scroll doesn't sync with the rest of the data grid like how column header does in mobile view. Any advice on how to remedy this?