WPF Datagrid IsReadOnly属性错误

时间:2012-10-18 13:48:46

标签: wpf

我在WPF中定义了datagrid,但是我无法在DataGridTextColumn和DataGrid中设置IsReadOnly属性

  <dg:DataGrid  SelectionUnit="FullRow"    ColumnHeaderStyle="{StaticResource ColumnHeaderStyleByGiri}"  ItemsSource="{Binding QueuedTradesCollection}"  Margin="20"                  
    AlternationCount="2" RowStyle="{StaticResource RowStyle}"

                 VerticalGridLinesBrush="#FFADD8E6" 

                 HorizontalGridLinesBrush="#FFADD8E6" AutoGenerateColumns="False"
    Grid.RowSpan="1" x:Name="grdvw_trades" CellStyle="{StaticResource CellStyle}">

<dg:DataGridTextColumn IsReadOnly="true"     Header="Notional/PairOffAmount"   Width="120" ElementStyle="{StaticResource RightAlignStyle}" SortMemberPath="Notional"  DataFieldBinding="{Binding Notional,StringFormat={}{0:C}}"/>

我收到以下错误消息“无法设置属性'DataGridColumn.IsReadOnly',因为它没有可访问的set访问器”

1 个答案:

答案 0 :(得分:1)

我使用WPF TOOLKIT 2008,IsReadonly Property仅存在于WPF Datagrid中。