Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions controls/datagrid/theming-and-styles/style-selectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ You can set a distinct style to a specific cell in a given column based on custo
## Row Background Style Selector

You can set a different style on a row, an alternate row, and on row details based on custom style-selection logic by using the `RowBackgroundStyleSelector` (`IStyleSelector`) property.
To apply a `RowBackgroundStyleSelector` you have to:
1. Create a custom class that inherits from `IStyleSelector`.
1. Implement the `SelectStyle` method.

The object item of the `SelectStyle` method is of type `DataGridRowInfo`. The `DataGridRowInfo` represents a class that provides information for each row in DataGrid and exposes the follwoing properties:

* `Item` (`object`)—Gets the business object associated with the row.
* `IsRowDetails` (`bool`)`—Gets a value that specifies whether the row is RowDetail.
* `IsAlternate` (`bool`)—Gets a value that specifies whether the row is an alternate one.


> For the DataGrid Row Background Style Selector example, go to the [SDKBrowser Demo Application]({%slug sdkbrowser-app%}) and navigate to the **DataGrid > Styling** category.

Expand Down