In the example XAML below, I want the Orphaned ID to be blank if the bound value is zero (which indicates that there is no orphan).
<DataGridTextColumn Header="Orphaned ID" Binding="{Binding OrphanedChangeID, StringFormat='{}{0:0;;#}'}"></DataGridTextColumn>
In this example, the format for negative numbers is not defined so it defaults to the format for positive numbers. The # symbol suppresses leading zeros - effectively leaving the column blank for zeros.
Great!!!
ReplyDelete