Sign In|Join
Home/Silverlight.NET Forums/Silverlight Controls and Silverlight Toolkit/Update datagrid row text color based on bounded data property value/Re: Re: Re: Update datagrid row text color based on bounded data property value
Participant
1392 Points
482 Posts
Nov 15, 2008 12:13 PM | LINK
Does any of you know about a known problem with binding the Foreground property and using IValueConverter on a DataGridTextColumn ?
On a TextBlock in a DataGridTemplateColumn this works fine:
Foreground="{Binding Item.IsDeleted, Converter={StaticResource ItemDeletedBrushConverter}}"
But setting the exactly the same line on a DataGridTextColumn throws an exception:
Item is a class having a boolean IsDeleted public property and again it works fine on DataGridTemplateColumn.
Obviously setting Foreground to {Red} for example does work for DataGridTextColumn.
Any idea ?
silverbyte
Participant
1392 Points
482 Posts
Re: Re: Re: Update datagrid row text color based on bounded data property value
Nov 15, 2008 12:13 PM | LINK
Does any of you know about a known problem with binding the Foreground property and using IValueConverter on a DataGridTextColumn ?
On a TextBlock in a DataGridTemplateColumn this works fine:
Foreground="{Binding Item.IsDeleted, Converter={StaticResource ItemDeletedBrushConverter}}"
But setting the exactly the same line on a DataGridTextColumn throws an exception:
Item is a class having a boolean IsDeleted public property and again it works fine on DataGridTemplateColumn.
Obviously setting Foreground to {Red} for example does work for DataGridTextColumn.
Any idea ?