Hello Mayank,
Is it possible to provide an isolated sample reproducing the behavior you described?
Thank you!
<infra:XamDataGrid
Name="ssnNameDatagrid" <infra:FieldLayout.Fields>
<infra:Field
Name="SocialSecurityNumber"
Width="Auto"
Label="{Localize socialSecurityNumber}">
<infra:Field.Settings>
<infra:FieldSettings
LabelClickAction="Nothing"
EditorType="{x:Type infraEditor:XamComboEditor}">
<infra:FieldSettings.EditorStyle>
<Style
TargetType="{x:Type infraEditor:XamComboEditor}">
<Setter
Property="ItemsProvider"
Value="{Binding Path=DataContext.ListOfSSNItemsProvider,RelativeSource={RelativeSource Mode=FindAncestor,AncestorLevel=1, AncestorType={x:Type UserControl}} }" />
Property="IsEditable"
Value="True" />
<EventSetter
Event="infraEditor:ValueEditor.ValueChanged"
Handler="OnValueChanged" />
Property="DropDownButtonDisplayMode"
Value="Always" />
private void OnValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
{ ValueEditor editor = (ValueEditor)e.OriginalSource; CellValuePresenter cvp = (CellValuePresenter)editor.Host; cvp.Value = editor.Value; RecordPresenter presenter = RecordPresenter.FromRecord(cvp.Record); if (presenter != null) { if (underWritinInfoNameSSNViewSE != null) { if ((Convert.ToString(cvp.Value).Contains(ViewModelConstants.SINGLE_HYPHEN_WITHOUT_SPACE) && Convert.ToString(cvp.Value).Length >= 13) || (!Convert.ToString(cvp.Value).Contains(ViewModelConstants.SINGLE_HYPHEN_WITHOUT_SPACE) && Convert.ToString(cvp.Value).Length >= 12)) underWritinInfoNameSSNViewSE.UpdateSSNAndName(cvp.Record.DataItem, e.OldValue); string tempNewValue = Utilities.RemoveHyphen(Convert.ToString(e.NewValue)); string tempOldValue = Utilities.RemoveHyphen(Convert.ToString(e.OldValue)); if ((!string.IsNullOrEmpty(Convert.ToString(tempNewValue)) && tempNewValue.Length != 12) || (string.IsNullOrEmpty(Convert.ToString(tempNewValue)) && tempNewValue.Length == 0)) { underWritinInfoNameSSNViewSE.EnableSSNOnRemoving(tempNewValue, tempOldValue); } } }
<infra:FieldSettings.EditorStyle> <Style TargetType="{x:Type infraEditor:XamComboEditor}"> <Setter Property="ItemsProvider" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.ListOfSSNItemsProvider}"/> <!--<Setter Property="ItemsProvider" Value="{Binding Path=DataContext.ListOfSSNItemsProvider,RelativeSource={RelativeSource Mode=FindAncestor,AncestorLevel=1, AncestorType={x:Type UserControl}} }" />--> <Setter Property="IsEditable" Value="True" /> <EventSetter Event="infraEditor:ValueEditor.ValueChanged" Handler="OnValueChanged" /> <Setter Property="DropDownButtonDisplayMode" Value="Always" /> <Style.Triggers> </Style.Triggers> </Style> </infra:FieldSettings.EditorStyle>
There is the same issue related to the XamComboEditor discussed and resolved in a forum post here: http://ko.infragistics.com/community/forums/t/104844.aspx
Explanation of the ComboBoxItem behavior you can see here: https://blog.elgaard.com/2009/09/03/wpf-making-combo-box-items-disabled-also-when-accessed-using-the-keyboard/
Sincerely,
Not worked with this.
I have created a sample application based on the approaches from the forum threads that I have provided in my previous post and it seems to work on my side.
If you still experience the issue, would you please modify the sample with the functionality that you are using, so it reproduces the issue?
This way I would be able to further investigate this for you and provide you with more detailed information on this matter.
Hi,
Can you please look into this as it is still not working for me.
In order to investigate the behavior further I would need to reproduce the issue. To do that, please provide a sample that demonstrates the described scenario.
Having this information would help me further investigate this matter for you.
Let me know if you have any questions or concerns.
The issue is still existing. The second number in drop down is disabled which is correct. But the issue occurs when we have entered the first number in first combobox and then we can enter the same number in second combobox as well. The number once entered should not be entered in the other dropdowns.
Is the issue with the keyboard selection reproducible on your side when running the ComboItemWorkaround sample application I have attached in my previous response? If that is so, could you please have a look at my environment details and steps to reproduce and let me know if there is any difference?
Environment details:
- Infragistics WPF 14.1.20141.1015
- Visual Studio 2015, Update 2;
- Windows 8.1;
Testing steps:
Click on the combo editor input area
Navigate through the items using the keyboard up and down arrows
Please note that in order to investigate the behavior further I would need to reproduce the issue. Feel free to share any details that are related to your environment and implementation and will be helpful in replicating the behavior.