-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MudDataGrid Default GroupTemplate At Grid Level #11237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MudDataGrid Default GroupTemplate At Grid Level #11237
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #11237 +/- ##
==========================================
+ Coverage 91.10% 91.13% +0.02%
==========================================
Files 465 466 +1
Lines 14407 14417 +10
Branches 2788 2792 +4
==========================================
+ Hits 13126 13139 +13
+ Misses 642 641 -1
+ Partials 639 637 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There is a pending PR that is going to cause quite a bit of conflicts, but should help with better separation if you wish to redo it. As for tests you should be able to implement a simple test to show the default grouping is accepted, and then an override grouping is accepted over it. |
Looks good. I will tweak the PR once that's in dev. |
It's in dev now. |
I'm looking forward on this, would be very helpful in my scenario! |
Are you still interested in this feature or should we close this to let someone else do it? |
e42cf7f
to
a442ca4
Compare
This should be updated to work with the multi level hierarchy. I have added basic tests to check the group row content with and without a template set at grid level. |
a442ca4
to
7d63b58
Compare
So is this readu for review again? |
Yes ready for review. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ScarletKuro This is ready for your review when time permits. I visually tested in both BSS and WASM as well.
Description
MudDataGrid provides a GroupTemplate on each column to control what information is presented when grouping by that column.
Its quite a common scenario to want to provide the same grouping information no matter which column is grouped. e.g. a count of the rows in the group or a percentage of the total rows. Providing the GroupTemplate on each column can be quite tedious for large grids.
This PR adds the GroupTemplate at grid level. Each column will use the most specific one in logical order:
GroupTemplate Specified In Column -> Group Template Specified in Grid -> Default Group Template
Example usage added to docs:
Note the PR makes the GroupedColumn property public and DataGrid accessible via GroupDefinition to allow for more complex aggregates. I think these are ok as DataGrid can be accessed by referencing anyway and GroupedColumn is only a getter.
How Has This Been Tested?
Visually. I'm not sure there are any tests to implement.
Type of Changes
Checklist
dev
).