Skip to content

Commit 3c258d0

Browse files
Merge pull request #1135 from telerik/didi/rowbackgroundstyle-selector
small adds
2 parents 9398cef + a64df99 commit 3c258d0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

controls/datagrid/theming-and-styles/style-selectors.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ You can set a distinct style to a specific cell in a given column based on custo
2323
## Row Background Style Selector
2424

2525
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.
26+
To apply a `RowBackgroundStyleSelector` you have to:
27+
1. Create a custom class that inherits from `IStyleSelector`.
28+
1. Implement the `SelectStyle` method.
29+
30+
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:
31+
32+
* `Item` (`object`)—Gets the business object associated with the row.
33+
* `IsRowDetails` (`bool`)`—Gets a value that specifies whether the row is RowDetail.
34+
* `IsAlternate` (`bool`)—Gets a value that specifies whether the row is an alternate one.
35+
2636

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

0 commit comments

Comments
 (0)