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.

How to clear previous selection in code behind?

Thread ID:

Created:

Updated:

Platform:

Replies:

131849 Jul 31,2017 05:34 AM Feb 28,2018 11:27 AM Xamarin.Forms 7
loading
Tags: SfAutoComplete
Rohan Satpute
Asked On July 31, 2017 05:34 AM

Hello,

I am using SfAutoComplete control for my project. The behaviour I am after is when an item is selected from the suggestion list, 
1. I want add it to an ObservableCollection in code behind 
2. After it is added to the collection, I want to clear the selection from the view (which is the functionality of the cross icon click on the selection)

I am able to add it, but not able to clear the selection from code after addition. I tried method ClearValue(SfAutoComplete.SelectedValueProperty), but it seems to be doing nothing.
Please help.

Best, 
Rohan

Vanaja  Annasamy [Syncfusion]
Replied On August 1, 2017 03:06 PM

Hi Rohan,

Thank you for contacting Syncfusion support.

We were unable to reproduce the reported issue "Unable to clear the previous items which is selected from the suggestion list". We have created the sample for your reference. Please download the same from the below link.

Link:  http://www.syncfusion.com/downloads/support/directtrac/184440/ze/AutoComplete128205-115303554 

Please run the sample and check whether issue reproduces at your end. If not please modify your changes in the above sample and revert the issue reproducing sample with replication steps. Please mention the platform in which you could reproduce the issue and this will help us to replicate the issue at our end.

Regards,
Vanaja R.A, 


Rohan Satpute
Replied On August 8, 2017 02:26 AM

Hi,

 Your project just shows a normal working sfautocomplete and clearing from UI (clicking the cross button). What I wanted to achieve is to use a method in code behind to clear the selected value on occurrence of an external event. I tried ClearValue method, but it doesn't work. 

Best,

Rohan.


Selva Kumar  Veerakrishnan [Syncfusion]
Replied On August 9, 2017 10:02 AM

Hi Rohan,

We have considered the issue "ClearValue method does not clear the SelectedValue" as bug and the support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.


Regards,
Selva Kumar V.


Darren McDaniel
Replied On August 14, 2017 07:06 PM

I'm experiencing the exact same issue with the latest binaries.... I used to be able to clear the text value  .Text = string.Empty;


but now.. nothing seems to be able to clear the value except the 'X' on the screen... 


Chozarajan Pandiyarajan [Syncfusion]
Replied On August 15, 2017 08:59 AM

Hi Rohan,

The reported issue "The SelectedValue has not cleared if we set the String.Empty to Text API" has already fixed in SfAutoComplete and we have provided the custom assemblies to you in your account. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents 
 
Regards,
Chozarajan P 


Allen Foster
Replied On February 27, 2018 04:43 PM

I am experiencing the same problem with version 16.1.0.24.

Rabhia Beham Kathar Mideenar [Syncfusion]
Replied On February 28, 2018 11:27 AM

Hi Rohan,

We are not able to reproduce the reported issue in SfAutoComplete Control with the latest Syncfusion Assemblies(16.1451.0.24). We have prepared a sample with your requirement.Please find the sample from the below link.

Sample Link: http://www.syncfusion.com/downloads/support/forum/131849/ze/AutoComplete128205_217417411
 

Please Check the sample provided and if the issue still persists from your side.Please modify the same with the issue reproducing steps which will be helpful for us to analyse further and update the appropriate solution.

Please let us know if you have any concern.

Regards,
Rabhia Beham 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.

;