我需要在更新XamDataGrid
中同一列的另一个单元格时更新列的单元格。
Iam尝试使用WPF
,MVVM
来实现此功能。有人可以帮帮我吗?网格中的数据正在填充,并且能够键入EmpSalary
(双击此列下的任何单元格)。现在,我需要更新另一个单元格(在同一列EmpSalary
)OnLostFocus
的已编辑单元格中。我确实尝试在网上搜索,但没有找到任何适当的方法来处理这个问题。我被困在这里。非常感谢你的帮助......
这是我的XAML
:
<igDP:XamDataGrid Name="ContentDataGrid" DataSource="{Binding DatatobeBound, Mode=TwoWay}" UpdateMode="OnUpdate">
<igDP:XamDataGrid.Resources>
<Style x:Key="EmployeeCellStyle" TargetType="{x:Type igEditors:XamTextEditor}">
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="HorizontalContentAlignment" Value="Right" />
</Style>
</igDP:XamDataGrid.Resources>
<igDP:XamDataGrid.FieldLayoutSettings>
<igDP:FieldLayoutSettings AllowClipboardOperations="Copy"
AllowDelete="False"
AllowFieldMoving="No"
AutoFitMode="Always"
AutoGenerateFields="False"
SelectionTypeCell="Single" />
</igDP:XamDataGrid.FieldLayoutSettings>
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.Fields>
<igDP:UnboundField BindingPath="EmpName">
<igDP:Field.Settings>
<igDP:FieldSettings AllowEdit="False" />
</igDP:Field.Settings>
</igDP:UnboundField>
<igDP:Field Name="EmployeeSalary" Label="EmployeeSalary" Visibility="Visible">
<igDP:Field.Settings>
<igDP:FieldSettings EditorStyle="{StaticResource EmployeeCellStyle}" />
</igDP:Field.Settings>
</igDP:Field>
</igDP:FieldLayout.Fields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>