views:

323

answers:

0

I'm trying to hide a column based a value I get from my object.

Following is a bit of my playing around.

Note: Binding="{Binding Path=SelectedShortName}" returns a value. I want to hide the column when that value is equal to something. I've tried a variety of ways, but it just seems like i'm butting my head.

Any input appreciated. Ta :)

<wpfToolkit:DataGridTemplateColumn Header="C" Width="20">
    <wpfToolkit:DataGridTemplateColumn.CellTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding ClassificationIndicator}" />
            <DataTemplate.Triggers>
            <DataTrigger Binding="{Binding Path=SelectedShortName}" Value="Inbox">

                </DataTrigger>
        </DataTemplate.Triggers>
            </DataTemplate>
    </wpfToolkit:DataGridTemplateColumn.CellTemplate>
</wpfToolkit:DataGridTemplateColumn>