Это кажется немного тривиальным, но у меня есть XamDataGrid
в моем приложении WPF, и я хотел бы сам установить заголовок своих столбцов, но не могу.
Привязка к BindingList<DictionaryEntry>
(не к .Net
, но по-прежнему имеет только свойства Key
и Value
.
Столбцы называются Key
и Value
(и обновляются, если я изменяю имена свойств в классе DictionaryEntry
), в то время как я хотел бы установить их в XAML: (раздел FieldsLayout
)
<igDP:XamDataGrid Grid.Row="1"
Grid.Column="0"
Name="ResultStructure"
DataSource="{Binding Path=VariablesDictionary, Mode=TwoWay, ValidatesOnExceptions=True}"
Theme="Aero"
GroupByAreaLocation="None"
IsEnabled="{Binding CanEditStructure}"
CellUpdating="ResultStructure_OnCellUpdating"
CellUpdated="ResultStructure_OnCellUpdated">
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings AllowClipboardOperations="All"
AllowFieldMoving="WithinLogicalRow"
AllowAddNew="True"
AddNewRecordLocation="OnBottom"
AllowDelete="True" />
</igDP:XamDataGrid.FieldLayoutSettings>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.Fields>
<igDP:Field Name="Column" Tag="Column" Width="Auto" />
<igDP:Field Tag="Variable" Name="Variable" Width="Auto" />
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>
Спасибо.