SampleConverter
bgConverter = new SampleConverter();
Binding binding = new Binding("IsChecked") { Mode = BindingMode.TwoWay, Converter = bgConverter, ValidatesOnExceptions = true };
DataGridRow objRow = GetDataGridRowByDataContext(dg, dg.SelectedItem);
if (objRow != null && objRow.IsValid)
{
objRow.SetBinding(
DataGridRow.BackgroundProperty, binding);
objRow.UpdateLayout();
dg.UpdateLayout();
}