Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
704
Bind row background to a DataRow property
posted

I have an extended DataRow class that has a Brush property called BackgroundBrush.  Is there any way to bind the xamXataGrid's row background to this value?  For example, my xamDataGrid is bound to my ViewModel.DataTable

The ViewModel.DataTable consists of the extended DataRows that has the extra BackgroundBrush property.  For brevity's sake, lets assume 3 rows are in my ViewModel.DataTable.

DataRow0.BackgroundBrush = Brushes.Red

DataRow1.BackgroundBrush = Brushes.Blue

DataRow2.BackgroundBrush = Brushes.Green

 

Is there any way to acheive this given that my grid is bound to a DataTable with the extended DataRow as I mentioned above?  Thanks