- <c1:C1DataGrid Name="C1Datagrid1" ItemsSource="{Binding CustomerList}" Style="{StaticResource DarkGray}" IsReadOnly="True">
- <c1:C1RowIndexHeaderBehavior.RowIndexHeaderBehavior>
- <c1:C1RowIndexHeaderBehavior InitialIndex="1"/>
- </c1:C1RowIndexHeaderBehavior.RowIndexHeaderBehavior>
- <c1:C1DataGrid.Columns>
- <c1:DataGridTextColumn Width="80" Header="客户类型" Binding="{Binding CustomerType}"/>
- <c1:DataGridTextColumn Width="80" Header="姓名" Binding="{Binding Name}"/>
- <c1:DataGridTextColumn Width="70" Header="年龄" Binding="{Binding Age}"/>
- </c1:C1DataGrid.Columns>
- </c1:C1DataGrid>
复制代码
上述代码实现的列表,使用的是WPF中C1DataGrid控件。如果列表中客户类型值为1或2。请问能不能根据客户类型的值,对这一行的数据进行背景色或者字体颜色的动态控制?需要如何做呢? |
|