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

QuickGrid: Add API to specify a custom class for <tr>. #45477

Closed
1 task done
kuba-si opened this issue Dec 6, 2022 · 6 comments · Fixed by #59901
Closed
1 task done

QuickGrid: Add API to specify a custom class for <tr>. #45477

kuba-si opened this issue Dec 6, 2022 · 6 comments · Fixed by #59901
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-quickgrid Pillar: Dev Experience Priority:1 Work that is critical for the release, but we could probably ship without triaged

Comments

@kuba-si
Copy link

kuba-si commented Dec 6, 2022

Is there an existing issue for this?

  • I have searched the existing issues

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

We have a business requirement to highlight (change the background colour of) individual rows in the grid, depending on certain properties of the items.

Describe the solution you'd like

I think this could be covered by a simple row class selector at the QuickGrid level. See here for a working prototype. The rows where the country name starts with an 'A' are highlighted in the "In-memory" page:

image

Additional context

No response

@mkArtakMSFT mkArtakMSFT added area-blazor Includes: Blazor, Razor Components feature-blazor-quickgrid enhancement This issue represents an ask for new feature or an enhancement to an existing one labels Dec 6, 2022
@mkArtakMSFT mkArtakMSFT added this to the Backlog milestone Dec 6, 2022
@ghost
Copy link

ghost commented Dec 6, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@ghost
Copy link

ghost commented Feb 15, 2023

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@mkArtakMSFT mkArtakMSFT modified the milestones: .NET 8 Planning, Backlog Jun 29, 2023
@ghost
Copy link

ghost commented Jun 29, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@simeyla
Copy link

simeyla commented Jun 30, 2023

Workaround for highlighting a row:

With the relatively new css pseudo-class :has you can create the following css rule:

tr:has(.selected), tr:has(.selected) td
{
    background: #45257 !important;
}

Then you simply need to apply the class selected to something (anything) inside one of your templated columns. It could even be an otherwise invisible element.

<TemplateColumn Title="Order" Class="col-order">
    <span class="order-id @(context.selected ? "selected" : "")">50001</span>
</TemplateColumn

I'm assuming they'll eventually add such functionality, and this won't of course work for anyone with an older browser so it can't be used if you have no control over your users' browser requirements. And if this doesn't make sense read up about :has().

@ghost
Copy link

ghost commented Dec 21, 2023

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@MackinnonBuck MackinnonBuck added the Priority:1 Work that is critical for the release, but we could probably ship without label Jan 18, 2024
@skotl
Copy link

skotl commented Dec 9, 2024

Seems that Microsoft are tracking the "can we select a row" request on this ticket, however most of the community feedback is over on #44899

This seems like a relatively easy win, given the suggestion by @simeyla, plus I agree with the others on #44899 that this is a pretty significant omission, even for a "quick grid".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-blazor-quickgrid Pillar: Dev Experience Priority:1 Work that is critical for the release, but we could probably ship without triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants