I have an ultraComboEditor with AutoCompleteMode=Suggest and AutoSuggestFilterMode=Contains, the ValueList is set to a value list created dynamically. IF the control is set to the 1st tab stop and you begin typing in the combo editor, you're receive the error below. If I change the control to the 2nd tab stop everything works as expected. If you change AutoComplete and AutoSuggest back to default, everything works as well. I tried recreating this in another project without success, however, in my production app it is 100% reproducible.
We're using 10.3.20103.2083
System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Win.ValueList.Infragistics.Win.IFilterableValueList.ApplyFilter(Object value, AutoSuggestFilterMode filterMode) at Infragistics.Win.EditorWithCombo.ProcessAutoComplete(Keys lastKeyDown) at Infragistics.Win.EditorWithCombo.ProcessTextBoxTextChanged(Boolean& selectionChangedByAutoEdit) at Infragistics.Win.EditorWithCombo.Infragistics.Win.IEmbeddableTextBoxListener.OnTextChanged() at Infragistics.Win.EmbeddableTextBox.OnTextChanged(EventArgs e) at System.Windows.Forms.TextBoxBase.WmReflectCommand(Message& m) at System.Windows.Forms.TextBoxBase.WndProc(Message& m) at System.Windows.Forms.TextBox.WndProc(Message& m) at Infragistics.Win.EmbeddableTextBoxWithUIPermissions.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I added a handler for the TextChanged event and it did NOT fire during the form load. The control is not data bound and the initial text is empty.
The thing I find most intriguing is I have the same control loaded the same way on other forms and it works great, but there's something unique about this form. I just can't figure out what it is!
Hi Scott,
According to this call stack, the control is processing a change in the Text property. In other words, something is changing the text of the control and it's trying to do auto-suggest, but it must be trying to do that too early.
What is the initial text in the control? Is anything in your code changing it in code or in the designer?
Is the control's Text or Value property bound?
Just as a text, try rapping the TextChanged event of the control and see if that fires when the form loads. If so, look at the call stack or the Text and maybe that will give us a hint where it's coming from.
This is from my Form Load:
IList<Company> theCompanies = serviceAP.GetCompanies();theCompanyList = new ValueList();foreach (var theCompany in theCompanies){ theCompanyList.ValueListItems.Add(theCompany.ID, theCompany.Code + " - " + theCompany.Name);}theCompanyList.SortStyle = ValueListSortStyle.Ascending;ultraComboEditorCompanyCode.ValueList = theCompanyList;
GetCompanies() just returns an IList of Company objects via NHibernate. We are NOT multithreading.
The funny thing is, I copied the code and controls from a similar form and it works just fine there. There's something specific to the new form that's causing the issue. I can demonstrate via GoToMeeting if you're interested.
Scott
I also try to reproduce your issue in my test project, but unfortunatelly without success. I guess that one possible reason to getting such issue might be your dynamic loading of the value list. If your are saying that setting TabIndex to 2 resolves your issue, this might be a timing issue. Since it is difficult for me to give you more accurate answer, could you please provide me some specific steps that you are doing in your application like, how to you are populating your value list, is there any conditions that have to be met when you are populating it, are you using multithreading ?
Please try to provide me more details and please keep me in touch.