dotnet / dotnet/aspnetcore

Conditional CSS class in Blazor QuickGrid column setup

Open
#45,657 5 comments 9 reactions 0 assignees View on GitHub
area-blazor enhancement feature-blazor-quickgrid
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

I have a grid. Grid has "Temperature" column. When Temperature is below 0, I would like to color whole table cell to red. When it's above 0, I would like to color it to green.

### Describe the solution you'd like

It would be nice to have access to `@context` in QuickGrid column header like this:

```csharp

```

### Additional context

For now I found a workaround either by using JS and observing changes, or using `has()` CSS class (which is not supported by default in Firefox).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.