diff --git a/controls/datagrid/theming-and-styles/style-selectors.md b/controls/datagrid/theming-and-styles/style-selectors.md index caa6e2df5..53b1dd2d1 100644 --- a/controls/datagrid/theming-and-styles/style-selectors.md +++ b/controls/datagrid/theming-and-styles/style-selectors.md @@ -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.