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 with AutoCompleteCombo selction change

Hello everyone,
I have one syncfusion windows autocomplete combo box which gets bound to a table's default view.My issue is that on selection change of the items of this combo,I conditionally fill up/clear the contents of other treeView controls' items.What I do in code is that I show a messagebox to the user(ok,cancel) for taking his/her consent for the next course of action.If the user selects cancel,I have to reset the auto complete combo box to its earlier selected value.

For achieving that I am actuall iterating through the autocomplete control's TableData property's rows collection and when my required row comes( I take one particular column's value and match it with my required one(this value is the initial value that i store in a local variable)),I set the Text property of the auto complete control to the desired one(the one before autocompleteitemselected event was fired).
But though in debug I can see the below given code is getting execute properly,on the screen the change does not take effect i.e it does not show the initial vale instead it shows the new changed value.



for(int i=0;i {
if (Convert.ToInt32(comboBoxAutoCompleteRelationship.AutoCompleteControl.TableData.Rows[i][0]) == relndomainid)
{
comboBoxAutoCompleteRelationship.Text = comboBoxAutoCompleteRelationship.AutoCompleteControl.TableData.Rows[i][1].ToString() ;
}
}

Can anyone pls help me to come out of this?
Thanks in advance,
Subrata




3 Replies

AD Administrator Syncfusion Team August 13, 2008 10:06 AM UTC

Hi Subrata,

Thank you for your interest in Syncfusion Products.

Please refer the below code snippets and let me know if this meets your requirement.


for (int i = 0; i < this.comboBoxAutoComplete1.AutoCompleteControl.TableData.Rows.Count; i++)
{
if (comboBoxAutoComplete1.AutoCompleteControl.TableData.Rows[i][0].ToString() == str)
{
comboBoxAutoComplete1.SelectedText = comboBoxAutoComplete1.AutoCompleteControl.TableData.Rows[i][0].ToString();
flag = false;
}
}

Please refer the sample that above illustrates.
http://websamples.syncfusion.com/samples/Tools.Windows/F75869//main.htm

Please let me know if any concerns.

Regards,
Hema





SD Subrata Das August 13, 2008 03:42 PM UTC

Hi Hema,
Thanks for your prompt reply.
But the code snippent that you provided is not working i.e it's not being able to change the dropdown to the initial state.

Thanks & Regards,
Subrata

>Hi Subrata,

Thank you for your interest in Syncfusion Products.

Please refer the below code snippets and let me know if this meets your requirement.


for (int i = 0; i < this.comboBoxAutoComplete1.AutoCompleteControl.TableData.Rows.Count; i++)
{
if (comboBoxAutoComplete1.AutoCompleteControl.TableData.Rows[i][0].ToString() == str)
{
comboBoxAutoComplete1.SelectedText = comboBoxAutoComplete1.AutoCompleteControl.TableData.Rows[i][0].ToString();
flag = false;
}
}

Please refer the sample that above illustrates.
http://websamples.syncfusion.com/samples/Tools.Windows/F75869//main.htm

Please let me know if any concerns.

Regards,
Hema







AD Administrator Syncfusion Team August 14, 2008 04:38 AM UTC

Hi Subrata,

Thank you for your patience.

I am afraid that I was not able to reproduce the issue mentioned here. Please find the simple sample in the following link:

http://websamples.syncfusion.com/samples/Tools.Windows/F75869/main.htm

Please find the vidoeclip for your reference in the below link:

http://websamples.syncfusion.com/samples/Tools.Windows/F75869_1/Toosl_WF_Autocomplete_Issue.zip

Please try the above sample and if the issue exists, please send us the steps to reproduce, so that I could work out in depth and provide you a better solution?

Please let me know if any concerns.

Regards,
Hema


Loader.
Live Chat Icon For mobile
Up arrow icon