Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.32k stars 535 forks source link

DataGrid Grouping - Flag for Expand Groups by default #5747

Open DaveAPerry opened 2 months ago

DaveAPerry commented 2 months ago

I'm working on a report and want to make use of the grouping feature of the DataGrid to split out different sections in the report. When the user navigates to the page I want all the sections expanded by default and allow them to collapse the groups they aren't interested in.

Describe the solution you'd like I think a parameter on the DataGrid for "GroupCollapse" (or something like that) that could be set to Collapse or Expand to configure the default state.

David-Moreira commented 2 months ago

Hello @DaveAPerry While a flag might be helpful we do have a programatic way of triggering the expand/collapse operations. Have you tried the ExpandAllGroups? When called at the appropriate time it should do as you ask.

DaveAPerry commented 2 months ago

@David-Moreira Yes, I have tried using Expand all groups, and it does work if I can get it to run at the proper time - I can get it to run on the initial render well enough - I need to put some more time in to get it to work properly when the component is rerendered (ie. Switching between blazorise tabs).

It's more of a nice to have idea than a need to have idea.

DaveAPerry commented 2 months ago

I was able to get it working - you can close this issue if you want.

Again, it's a nice to have not a need to have.