You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apply a stylesheet class to a row of the grid based on the row item using the `RowClass` parameter.
201
+
202
+
In the following example:
203
+
204
+
* A row item is represented by the `Person`[record](/dotnet/csharp/language-reference/builtin-types/record). The `Person` record includes a `FirstName` property.
205
+
* The `HighlightJulie` method applies the `highlight` class styles to any row where the person's first name is "`Julie`."
206
+
207
+
```razor
208
+
<QuickGrid ... RowClass="HighlightJulie">
209
+
...
210
+
</QuickGrid>
211
+
212
+
@code {
213
+
private record Person(int PersonId, string FirstName, string LastName);
214
+
215
+
private string HighlightJulie(Person person) =>
216
+
person.FirstName == "Julie" ? "highlight" : null;
217
+
}
218
+
```
219
+
220
+
:::moniker-end
221
+
194
222
## Entity Framework Core (EF Core) data source
195
223
196
224
Use the factory pattern to resolve an EF Core database context that provides data to a `QuickGrid` component. For more information on why the factory pattern is recommended, see <xref:blazor/blazor-ef-core>.
0 commit comments