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.

Get selected value from DataSource

Thread ID:

Created:

Updated:

Platform:

Replies:

127114 Oct 26,2016 06:06 PM Nov 1,2016 06:32 AM Xamarin.Forms 5
loading
Tags: SfAutoComplete
Ian Nájar
Asked On October 26, 2016 06:06 PM

I set a List<object> to the DataSource property of a SfAutoComplete control,

How can I retrieve the value once the value is selected?
I'm only able to get the displayed text value (with Text property), but not the object which is refering to.

Chozarajan Pandiyarajan [Syncfusion]
Replied On October 27, 2016 08:37 AM

Hi Lan,

Thanks for contacting Syncfusion Support.

Query: How to get the selected value from AutoComplete when DataSource property set.

We have created a simple sample as per your scenario. Please downloaded from the below link.

Link: http://www.syncfusion.com/downloads/support/forum/127114/ze/AutoComplete_Data242290850 

Please let us know whether given sample meets your requirement. If not update us with more details.

Regards,
Chozarajan P

 


John
Replied On October 30, 2016 03:38 AM

Hi Chozarajan

I've looked at the solution in the link supplied, when selecting from the dropdown for the first time the autoComplete.SelectedIndex shows 0 , on every subsequent selection, the dropdown shows the previously selected item and not the currently selected item. 
is that the correct expected behaviour, and if so, what would be the best way to get the currently selected item? 



Pavendhan Kumar [Syncfusion]
Replied On October 31, 2016 03:30 AM

Hi Stephanie,

Thank you for your update.

SelectedIndex value starts from zero in nature. So whenever your are selecting the first item it will display one index less than actual. We have modified the sample for your convenience.please download the same from the following link.

Link: http://www.syncfusion.com/downloads/support/forum/127114/ze/AutoComplete_Data1286023421 

Please let us know whether the given sample meets your requirement or not.

Regards,
Pavendhan K. 


John
Replied On October 31, 2016 07:35 PM

Hi, thanks for the updated example.

I've included a few screenshots to demonstrate the steps to recreate the issue as experienced in the ios version

Image 1 
Selected 'aseka' and the selected value is displaying as empty while it should be 'AKT'

Image 2 
Selected 'akabe' and the selected value is displaying 'AKT' from previous selection while is should be 'SSKV'

Attachment: Images_fdf3ec66.zip

Pavendhan Kumar [Syncfusion]
Replied On November 1, 2016 06:32 AM

Hi Stephanie,

Sorry for the convenience caused.

We were able to reproduce the reported issue "SelectedValue and SelectedIndex properties returns wrong values" at our end. And we have logged a bug report regarding the same.A support incident to track the status of this defect has been created under your account.

Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents/  

Regards,
Pavendhan K.  


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.

;