Is the CustomValueEnteredAction property present in the XamComboEditor? The documentation appears to say so.. (http://help.infragistics.com/Help/NetAdvantage/WPF/2011.2/CLR4.0/html/InfragisticsWPF4.Controls.Editors.XamComboEditor.v11.2~Infragistics.Controls.Editors.ComboEditorBase%602~CustomValueEnteredAction.html)
But I cant find it when in the xaml or the codebehind.
Hello jlmehta ,
I have been looking into your question and I believe that the issue that you are referring may be caused because currently we support two different XamComboEditor controls in our WPF package that provide slightly different functionality. You can use our old XamComboEditor control by adding InfragisticsWPF4.Editors.v11.2 dll to your application. Also we have exported our Silverlight XamComboEditor control, so in version 11.2 you can also take advantage from it in your WPF application. The CstomValueEnteredAction property is available only for our new XamComboEditor from the namespace Infragistics.Controls.Editors .
Please let me know if you need any further information on this matter.
Thanks Elena for your reply.
The primary reason I want to use the CustomValueEnteredAction property is to add a new item to the comboEditor when a user enters a new string in the ComboEditor and presses the Enter key. In the old XamComboEditor I could not find a satisfactory way to handle the Enter key. The CustomValueEnteredAction property seems to be exactly what I'm looking for and hence the question.
So how do I use the Silverlite exported XamComboEditor in XAML? Alternatively things would work for me if you could advise me on a good way to handle the Enter key press. Although I would prefer the CustomValueEnteredAction to work..
Here's what I have right now
xmlns:ig="http://schemas.infragistics.com/xaml"xmlns:igEditors="http://infragistics.com/Editors"<igEditors:XamComboEditor x:Name="CB2" Grid.Row="0" Width="200" Margin="0 5 0 5" ItemsSource="{Binding ViewModel.LayoutList}" Text="{Binding ViewModel.NewLayoutName, Mode=TwoWay}" IsEditable="True" DropDownClosed="FireSwitchLayout" ></igEditors:XamComboEditor>
Hello jlmehta,
You can find the full documentation about our dual platform XamComboEditor and information how you can add it to your application at the following links:
http://help.infragistics.com/NetAdvantage/WPF/2011.2/CLR4.0/?page=DP_xamComboEditor.html
http://help.infragistics.com/NetAdvantage/WPF/2011.2/CLR4.0/?page=DP_xamComboEditor_Adding_xamComboEditor_to_Your_Application.html
Furthermore in order you decide to stick to our old XamComboEditor I can suggest you handle the EditModeEnding event instead of ‘Enter’ input, and manually add the item in its handler. This way you will ensure that the value will be added even when the user navigate out of the combo without pressing ‘Enter’. Another option that I can suggest you is handling PreviewKeyDown event and adding the value through it:
private void combo1_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Enter)
Infragistics.Windows.Editors.XamComboEditor ed = sender as Infragistics.Windows.Editors.XamComboEditor;
(ed.ItemsSource as ObservableCollection<SimpleDataPoint>).Add(new SimpleDataPoint() { Value = Convert.ToDouble(ed.Text) });
}
If you need any further assistance with this, please do not hesitate to ask.
Thanks Elena, I'll go thru the documentation.
Edit: Edited to remove unwanted info
Hello jimehta,
Thank you for the update. If after reviewing the documentation you still have any questions or concerns on this matter, please do not hesitate to ask.