Skip to content
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

[Bug]: DataGrid with disabled columns collapses when using DetailRowTemplate #5855

Closed
Alexander-JM-0224 opened this issue Nov 18, 2024 · 1 comment · Fixed by #5869
Closed
Assignees
Labels
Status : Finished Finished work on issue, to be closed (merge/review pending, etc...) Type: Bug 🐞 Something isn't working
Milestone

Comments

@Alexander-JM-0224
Copy link

Blazorise Version

1.6.2

What Blazorise provider are you running on?

Bootstrap5

Link to minimal reproduction or a simple code snippet

https://github.com/Alexander-JM-0224/BlazoriseDataGridTestApp

Steps to reproduce & bug description

Build and open project, In the project you can choose multiple pages. The pages for this bugreport are:

  • DetailRow
  • DetailRow - Display
  • DetailRow - Displayable

Open a detailrow on every page, and see the difference in the grid styling.

What is expected?

What i expect is when i "turn off" a column with either the Display or the Displayable attribute, that is does not get counted for the width of the Detailrows.

What is actually happening?

What is happening is that i see in the inspector that the "colspan" does not count the right amount of columns...

My theory, if i have 5 columns, and i turn 1 off with Display/Displayable colspan should be 4. But it stays 5.

And this does the styling of the page no favors as you can see in the example project.

What browsers do you see the problem on?

Chrome, Safari, Firefox, Microsoft Edge

Any additional comments?

We have fixed this by using @if() statements around the whole column, this works fine.

But i will still report this bug because me thinks this is no suitable behaviour, or at least it should be documented in the documentation.
Maybe this has to do with the Fixed grid width we use?

If you need more info, or want a clearer explanation, let me know!

Thanks as always ;)

@Alexander-JM-0224 Alexander-JM-0224 added the Type: Bug 🐞 Something isn't working label Nov 18, 2024
@stsrki stsrki added this to Support Nov 19, 2024
@github-project-automation github-project-automation bot moved this to 🔙 Backlog in Support Nov 19, 2024
@stsrki stsrki added this to the 1.7 support milestone Nov 19, 2024
@David-Moreira
Copy link
Contributor

Hello @Alexander-JM-0224
The supported way, should be by using the Displayable parameter to go through the internals correctly.
Using CSS, styling, etc might not yield correct results.

IN this case, the Displayable example you have provided us with, should correctly adjust the col span as you mention.
We'll fix this issue, thanks for reporting.

@David-Moreira David-Moreira added the Status : Finished Finished work on issue, to be closed (merge/review pending, etc...) label Nov 23, 2024
@stsrki stsrki closed this as completed Nov 25, 2024
@github-project-automation github-project-automation bot moved this from 🔙 Backlog to ✔ Done in Support Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status : Finished Finished work on issue, to be closed (merge/review pending, etc...) Type: Bug 🐞 Something isn't working
Projects
Status: ✔ Done
3 participants