Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

  • silverbyte

    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 ?

     

    Please click on 'Mark as answer' near my comment if you feel I answered your question.