Hello,
I got this strange behavior siunce Q2 but since it happens only on my dev machine and not in production I was not too much intrested in the cause... the problem is I've got a RadComboBox with TextSearch enabled.... I've got almost 13000 items in the combobox and when I start typing I got this exception
Here's my code :
cs file :
and XAML :
Hope it helps...
Thanks
I got this strange behavior siunce Q2 but since it happens only on my dev machine and not in production I was not too much intrested in the cause... the problem is I've got a RadComboBox with TextSearch enabled.... I've got almost 13000 items in the combobox and when I start typing I got this exception
Microsoft JScript runtime error: Sys.InvalidOperationException: ManagedRuntimeError error #4004 in control 'Xaml1': System.NullReferenceException: Object reference not set to an instance of an object. <br> at System.Windows.DependencyPropertyChangedWeakListener.Disconnect() <br> at System.Windows.DependencyPropertyChangedWeakListener.SourcePropertyChanged(DependencyObject c, DependencyProperty dp) <br> at System.Windows.DPChangedEventHandler.Invoke(DependencyObject sender, DependencyProperty dp) <br> at System.Windows.DependencyObject.OnPropertyChanged(DependencyProperty dp) <br> at System.Windows.FrameworkElement.OnPropertyChanged(DependencyProperty dp) <br> at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isSetByStyle, Boolean isSetByBuiltInStyle, PropertyInvalidationReason reason) <br> at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value) <br> at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) <br> at Telerik.Windows.Controls.RadComboBox.set_Text(String value) <br> at Telerik.Windows.Controls.RadComboBox.TextUpdated(String newText, Boolean textBoxUpdated) <br> at Telerik.Windows.Controls.RadComboBox.OnEditableTextBoxTextChanged(Object sender, TextChangedEventArgs e) <br> at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args) <br> at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName) |
Here's my code :
cs file :
public partial class Inserimento : UserControl, IParentHoldCliente, IDisposable, IParentHoldFondo <br> { <br> #region Variables <br> private IFWebLight.DO.IFMondoAParte.MondoAParteClient clientMAP; <br> private IFWebLight.DO.IFPosizione.PosizioneClient clientPOS; <br> private Cliente m_Cliente; <br> private ClientDataSource clientDataSource; <br> <br> private double m_qty = 0; <br> private double m_nav = 0; <br> private double m_ctv = 0; <br> private DateTime m_OrderTime; <br>[...] <br> <br> private void LoadClientList() <br> { <br> if (App.m_ListaCliente == null) <br> { <br> clientPOS.GetListaClientiAsync(App.UserName); <br> } <br> else <br> { <br> cbNDG.IsEnabled = true; <br> clientDataSource = new ClientDataSource(App.m_ListaCliente, "D"); <br> cbNDG.DataContext = clientDataSource; <br> <br> clientMAP.GetModalitaRicezioneOrdiniAsync(App.UserName); <br> } <br> } |
and XAML :
<StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal" Margin="0,5,0,0" > <br> <TextBlock Text="Dossier" TextAlignment="Left" Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" Width="100" Height="16"/> <br> <telerikInput:RadComboBox GotFocus="cbNDG_GotFocus" Margin="10,0,0,0" x:Name="cbNDG" Height="16" Width="120" IsTextSearchEnabled="False" IsEditable="True" IsEnabled="False" KeyDown="cbNDG_KeyDown" <br> Text="{Binding Text, Mode=TwoWay}" SelectionChanged="cbNDG_SelectionChanged" Tag="NDG" ItemsSource="{Binding FoundClient}" DisplayMemberPath="D"/> <br> <TextBox x:Name="tbIntestatario" HorizontalAlignment="Right" TextWrapping="Wrap" Width="190" Background="LightGray" IsReadOnly="True" /> <br> <Button x:Name="btnSearchCliente" Margin="5,0,0,0" Content="Search" HorizontalAlignment="Right" Width="40" Height="20" FontSize="10" Click="btnSearchCliente_Click" /> <br> </StackPanel> |
Hope it helps...
Thanks