We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

problem

Hi,
I have an AutoComplete Control associate to an inherited TextBox the control is embedded and is a private property of the TextBox. The creation of the AutoComplete, the SetAutoComplete and the event TargetChanging are only occurring in the inherited TextBox constructor:
this._autoComplete = new AutoComplete();
this._autoComplete.SetAutoComplete(this,AutoCompleteModes.Both);
this._autoComplete.TargetChanging += new AutoCompleteTargetChangingEventHandler(_autoComplete_TargetChanging);

If the set SetAutoComplete is only occurring for this textbox why the following exception is thrown:
void _autoComplete_TargetChanging(object sender,AutoCompleteTargetChangingEventArgs args) {
throw new Exception("The method or operation is not implemented.");
}
The target should not change since this AutoComplete is only set for that TextBox?

5 Replies

AR Anupama Roy Syncfusion Team October 5, 2006 12:40 PM UTC


Hi Benoit,

I hope you are working with VS2005.The event should fire if you have written some code for different editControls enabled with same AutoComplete control.If you have not written any code for this event,what you need to do is just remove the "not implemented exception code".

If you have written some code under this event,please let me know so that I can investigate why the code is throwing exception.

Thanks for choosing Syncfusion products.

Regards,

Anu.



BM Benoit Marsot October 11, 2006 09:17 PM UTC

Hi,

I am sorry about the lack of clarity of my first question.

Problem #1:
The problem is that the AutoComplete should not change target since it is only associated to one TextBox.

Problem #2:
Another problem exposed by this sample is the focus. Onload event of this form I set the focus on the TextBox2:
private void Form1_Load(object sender,EventArgs e) {
this.autoCompleteTextBox2.Focus();
}
The focus is still set to the TextBox1

I attach a sample this time to make the two problems clearer. The focus and the target changing are a show stopper to uses your AutoComplete control. They are a part a complex UI changing the focus from one textbox to another when an AutoSelect entry is selected.

To see the full impact of the problems click (not tab) on the second TextBox to set the focus on TextBox2.


TargetChanging.zip


BM Benoit Marsot October 11, 2006 10:19 PM UTC

FYI:
I am using:
VS 2005
.net 2.0
Syncfusion 4.3.0.30


AR Anupama Roy Syncfusion Team October 12, 2006 06:22 PM UTC


Hi Benoit,

I was able to reproduce the issue mentioned about focus.I am currently working on this and will get back to you soon.

Thanks,

Anu.


AR Anupama Roy Syncfusion Team October 13, 2006 11:28 AM UTC


Hi Benoit,

Inorder to set the Focus to autoCompleteTextBox2,you set the form''s ActiveControl to be this control in Form Load as shown below.

to this.ActiveControl = this.autoCompleteTextBox2;

However,I was able to see the infinite loop as you have said and we have requested our developers to look into this matter.As you have added a MessageBox to show us the problem,it was reproducable.However,do you actually need to code something in this event and does it get affected due to this cascaded loop?

Please let us know if you have any queries.

Thanks,

Anu.

Loader.
Live Chat Icon For mobile
Up arrow icon