当XamDataGrid滚动时,combobox SelectedItemChanged将触发

时间:2014-04-29 05:19:28

标签: c# wpf infragistics

我在用户控件中有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>

1 个答案:

答案 0 :(得分:0)

我正在追逐同样的问题。对我有用的解决方案是添加RecordContainerGenerationMode =&#34; LazyLoad&#34;属性。