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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Autocomplete Dropdown''s SelectedItem property

Thread ID:

Created:

Updated:

Platform:

Replies:

79904 Mar 3,2009 05:58 PM UTC Mar 4,2009 06:33 AM UTC WinForms 1
loading
Tags: Tools
Subrata Das
Asked On March 3, 2009 05:58 PM UTC

Hi All,
Can anybody please tell me why my syncfusion autocomplte comboboxe's(name is "cmbRelationship") SelectedItem property shows null inside the below mentioned method?

private void cmbRelationship_AutoCompleteControl_AutoCompleteItemSelected(object sender, Syncfusion.Windows.Forms.Tools.AutoCompleteItemEventArgs args)
{
try
{
boRetrieve = false;
if (firstTime)
{

if (cmbRelationship.AutoCompleteControl.SelectedItem != null)
LoadBODetails();
}
catch (Exception e2)
{
MessageBox.Show("Please Select Beneficial Owner","Message");
}
}

Thanks & Regards,
Subrata Das


Administrator [Syncfusion]
Replied On March 4, 2009 06:33 AM UTC

Hi Subrata,

Thank you for using Syncfusion products.

AutoCompleteItemSelected event will raise after selecting an item from autocomplete popup. The SelectedItem property displays selected item from the list and not from the autocomplete popup. Hence SelectedItem displays null inside AutoCompleteItemSelected event. You can use SelectedValue property of AutoCompleteItemEventArgs argument to get the selected value in the autocomplete popup .

Here is the code snippet.

[C#]

void autoComplete1_AutoCompleteItemSelected(object sender, Syncfusion.Windows.Forms.Tools.AutoCompleteItemEventArgs args)
{
Console.WriteLine(args.SelectedValue.ToString());
}

Please let me know if this helps you.

Regards,
Jaya



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.

Warning Icon 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.Close Icon

;