当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - TargetNullValue=n/a based on another columns Value

问题描述:

I have a DevEx GridView which is bonded to a data table I have one column the user has to enter a date when he sent an ASN but not all orders require one so I've another column in the data table (not in the grid) with a bool value(true or null, my data table supports null values) if it is required or not, what i want do do is if required is = null then on the date column in the gridview it should say "n\a"

I tried the following but its not working:

 <dxg:GridColumn FieldName="ASN_SENT" Name="gridColumn14" Validate="gridColumn14_Validate" Header="ASN Sent">

<dxg:GridColumn.CellStyle>

<Style TargetType="{x:Type dxg:CellContentPresenter}">

<Style.Triggers>

<DataTrigger Binding="{Binding Path=RowData.Row.ASN_Req}" Value="Null">

<Setter Property="TextBlock.Text" Value="N/A"/>

</DataTrigger>

</Style.Triggers>

</Style>

</dxg:GridColumn.CellStyle>

</dxg:GridColumn>

分享给朋友:
您可能感兴趣的文章:
随机阅读: