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

Allow CSS theming of grid error text. #291

Closed
nitroxis opened this issue Jun 12, 2021 · 2 comments
Closed

Allow CSS theming of grid error text. #291

nitroxis opened this issue Jun 12, 2021 · 2 comments

Comments

@nitroxis
Copy link
Contributor

I'm customizing the styling of this (really awesome!) grid component. However, the "error" <p> appears to be hard coded currently:

<p id="error" style="color:red;">@Error</p>

It would be very helpful if this instead used a class like .grid-error instead of element styles to allow styling of this text.

Additionally, I noticed that this element moves the grid down a bit because it is always present, no matter if it's empty or not. Wrapping it in an @if(!string.IsNullOrEmpty(Error)) { <p>... } or something similar might make sense. I managed to hide it with a CSS :empty selector for now.

@gustavnavar
Copy link
Owner

Package version 2.1.17 supports this feature.

You can override the grid-error css class or you can use another class setting the GridErrorCssClass parameter of the GridComponent object (https://github.com/gustavnavar/Grid.Blazor/blob/master/docs/blazor_server/GridBlazor_configuration.md#gridcomponent-parameters)

@nitroxis
Copy link
Contributor Author

Cool, thanks!

rgentry09 pushed a commit to rgentry09/ERP-ASP.NET that referenced this issue Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants