There is probably a quick explination for this, but I am stumped as to why I cannot compile the following:
xmlns:ig=http://schemas.infragistics.com/xaml
...
<
ig:XamMultiColumnComboEditor x:Name="xamMultiColumnComboEditor"
ItemsSource="{Binding Path="
CheckBoxVisibility="True"
AllowMultipleSelection="{Binding ElementName=chkAllowMultipleSelection, Mode=TwoWay, Path=IsChecked}"
CustomValueEnteredAction="Allow"
AutoGenerateColumns="False"
Height="30" Width="400"
MultiSelectValueDelimiter=","
SelectedItemsResetButtonVisibility="Visible"
Text="{Binding Path=InstrumentId, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
ig:XamMultiColumnComboEditor.Columns>
ig:TextComboColumn Key="Ticker" />
ig:TextComboColumn Key="Cusip" />
</
ig:XamMultiColumnComboEditor>
Thanks
Hello Christian,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
I have modified the sample further, so now there is an event handler for the Pasting. Basically I followed this suggestion from the stack overflow to achieve this. As for the "object out of range error", I wasn't able to reproduce this on my side, neither the "Value cannot be null.\r\nParameter name: source". Could you please try to modify my sample, so this is reproduced there and send it back to me for further investigation. Also could you please tell what is the exact version of NetAdvantage that you are using. Mine is 14.1.20141.2027.
Looking forward for your reply.
Hi and thanks for the response
I tried the method you attached and i do observe the SelectedItems property being initialized in the constructor - however upon the XAML opening, I get an error on the following line:
SelectedItems="{Binding Path=SelectedProductItems, Mode=TwoWay}"
'Infragistics.Controls.Editors.ComboEditorBase(Infragistics.Controls.Editors.ComboRow, Infragistics.Controls.Editors.Primitives.ComboCellsPanel).SelectedItems' threw an exception.'
with the inner exception:
{"Value cannot be null.\r\nParameter name: source"}
----
also, everything else seems to work as it needs to, and I have used the following method to capture the text displayed on the control in the codebehind:
private
void XamMultiColumnComboEditor_Loaded(object sender, RoutedEventArgs e)
{
SpecializedTextBox inputTextBox = Utilities.GetDescendantFromType(
(sender as DependencyObject), typeof(SpecializedTextBox), false)
as SpecializedTextBox;
Binding searchTextBinding = new Binding("InstrumentId");
searchTextBinding.Source = DataContext;
searchTextBinding.UpdateSourceTrigger =UpdateSourceTrigger.PropertyChanged;
inputTextBox.SetBinding(SpecializedTextBox.TextProperty, searchTextBinding); }
But I have two questions about this:
1, when I enter new text that doesn't already exist in the Combobox, I can search on it - but if I attempt to erase the text, I am hit with an object out of range error
2, how can I capture the paste event of comboeditor when
CustomValueEnteredAction = true?
On xamdatagrid I am able to do the following:
ExecutingCommand ="SecurityBlotterGrid_ExecutingCommand"
and capture the paste event on the codebehind, but I cannot do the same with comboEditor.
Any advice please?
I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation. Please note that the collection that the SelectedItems Proerty is bound to is of ObservableCollection<object> type. Also it is initialized in the constructor of the ViewModel.
Hi, issue was that I didn't have the proper reference dll included in the project.
Related question:
I am binding this XamMultiColumnCombo editor to a viewmodel. The ItemsSource is the sum total of all instruments currently in memory, and I want to bind selectedItems to what is currently being viewed on the screen. It seems to throw me an error "source can not be null" when loading up. Obviously "SelectedInstrumentList" will be null if the xaml runs before the viewmodel. Any idea how I can avoid this issue? Also, the line AllowMultipleSelection doesn't seem to work. I have it bound to another checkbox where the user should be able to allow or disallow multi selection, is that the proper syntax?
<ig:XamMultiColumnComboEditor x:Name="xamMultiColumnComboEditor"
ItemsSource="{Binding Path=MasterInstrumentList}"
CheckBoxVisibility="Visible"
Width="300"
SelectedItems="{Binding Path=SelectedInstrumentList, Mode=TwoWay}" <- Problem line
Grid.Row="1" Grid.Column="1">
<ig:XamMultiColumnComboEditor.Columns>
<ig:TextComboColumn Key="Ticker" />
<ig:TextComboColumn Key="Cusip" />
</ig:XamMultiColumnComboEditor.Columns>
</ig:XamMultiColumnComboEditor>
<CheckBox x:Name="chkAllowMultipleSelection" Grid.Row="1" Grid.Column="2" Content="Multi listing" Margin="2" />