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.
Unfortunately, activation email could not send to your email. Please try again.

problem

Thread ID:

Created:

Updated:

Platform:

Replies:

50079 Oct 5,2006 04:21 AM Oct 13,2006 07:28 AM Windows Forms 5
loading
Tags: Tools
Benoit Marsot
Asked On October 5, 2006 04:21 AM

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?

Anupama Roy [Syncfusion]
Replied On October 5, 2006 08:40 AM


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.


Benoit Marsot
Replied On October 11, 2006 05:17 PM

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

Benoit Marsot
Replied On October 11, 2006 06:19 PM

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

Anupama Roy [Syncfusion]
Replied On October 12, 2006 02:22 PM


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.

Anupama Roy [Syncfusion]
Replied On October 13, 2006 07:28 AM


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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;