How To Change Row Background Based On Rowstate When Underlying Source Is Datatable In WPF Datagrid (Sfdatagrid)?

Sample date Updated on Sep 13, 2025
wpf wpf-application wpf-datagrid

This example illustrates how to change row background based on RowState when underlying source is DataTable in WPF DataGrid (SfDataGrid).

You can change the row background based on RowState.Modified when binding WPF DataGrid (SfDataGrid) to DataTable using style for initial loading. You can also change the background for runtime changes using the DataTable.RowChanged event.

KB article - How to change row background based on RowState when underlying source is DataTable in WPF DataGrid (SfDataGrid)?

Up arrow