XamDataGrid滚动时触发组合框SelectedItemChanged
本文关键字:组合 SelectedItemChanged 滚动 XamDataGrid | 更新日期: 2023-09-27 18:00:43
我在用户控件中有XamDataGrid。在网格中,我有一个组合框,它有SelectedItemChanged事件。我正在根据下拉选择设置一些值。当用户选择一行并垂直滚动时,SelectedItemChanged事件将触发,并且正在为所选行设置值。有没有一种方法可以忽略事件火。
<igDP:UnboundField Name="HierarchyLevel1" BindingPath="HierarchyLevel1.Value" BindingMode="TwoWay" Label="Hierarchy Level 1"
DataType="{x:Type proxy:BasicDataDTO}" >
<igDP:UnboundField.Settings>
<igDP:FieldSettings EditAsType="{x:Type proxy:BasicDataDTO}" EditorType="{x:Type igEditors:XamComboEditor}" >
<igDP:FieldSettings.EditorStyle>
<Style TargetType="{x:Type igEditors:XamComboEditor}">
<Setter Property="Tag" Value="{Binding Source={StaticResource ResourceKey=HierarchyLevel1}}"/>
<Setter Property="ValueType" Value="{x:Type proxy:BasicDataDTO}" />
<Setter Property="IsEditable" Value="False"/>
<Setter Property="IsReadOnly" Value="{Binding Path=.,Converter={StaticResource ResourceKey=DeleteRowConverter}}"/>
<Setter Property="ItemsSource" Value="{Binding Source={x:Static Member=common_util:GlobalDataCache.BasicDataCache}, Converter={StaticResource CacheConverter}, ConverterParameter={StaticResource HierarchyIdType}}"/>
<EventSetter Event="SelectedItemChanged" Handler="HierarchyLevel_SelectedItemChanged" />
<EventSetter Event="KeyUp" Handler="DdlBasicDataKeyPress"/>
<EventSetter Event="ValueChanged" Handler="DdlBasicDataDes_ValueChanged" />
</Style>
</igDP:FieldSettings.EditorStyle>
</igDP:FieldSettings>
</igDP:UnboundField.Settings>
</igDP:UnboundField>
我也遇到了同样的问题。对我有效的解决方案是将RecordContainerGenerationMode="LazyLoad"添加到属性中。