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.

Autoselect first item

Thread ID:

Created:

Updated:

Platform:

Replies:

132097 Aug 14,2017 05:05 AM Aug 22,2017 12:33 AM WPF 7
loading
Tags: AutoComplete
Alexey Starkov
Asked On August 14, 2017 05:33 AM

Hello! I am trying to use AutoComplete control and I have a problem. The first item is automatically selected when app start. Accordingly, the event handler of the item selection event is triggered.

XAML:
syncfusion:AutoComplete Name="cardAutoComplete" Grid.Row="1" Grid.Column="2" DisplayMemberPath="CardNumber" IsAutoAppend="True" Source="Custom" SelectionMode="Single" CustomSource="{Binding Cards, UpdateSourceTrigger=PropertyChanged}" SelectedValueChanged="AutoComplete_SelectedValueChanged"  Margin="5" CanResizePopup="False"

"Cards" is ObservableCollection:
C#:
private ObservableCollection cards;
public ObservableCollection Cards { get { return cards; } set { cards = value; cards = new ObservableCollection(cards.OrderByDescending(x => x.IsActive).ThenBy(x => x.LocalUser.Name).ToList()); OnPropertyChanged("Users"); OnPropertyChanged("Cards"); } }

I am using OnPropertyChanged("Cards") because I need to assign a reference to another collection object.

How to disable first item autoselection? I want to use this control for searching item.

Priyanga Balasubramaniam [Syncfusion]
Replied On August 15, 2017 02:18 AM

Hi Alexey,

Thank you for using Syncfusion Products.

We have checked the reported issue by creating simple sample based on your code example. But in this sample, first item is not selected at the starting.

Could you please check whether the issue is reproduced with the below sample? Also update us your current Essential studio version. It will help us to proceed further on this.

You can download the sample from the below location.

Sample: 132097


Regards,
Priyanga B

Alexey Starkov
Replied On August 16, 2017 06:28 AM

Yes, your sample works correctly,  issue is not reproduced. I was updated Essential Studio, but it did not change anything. I think I found the source of the problem. I am using AutoComplete control in TabItem of TabControl and first item is automatically selected when I select appropriate TabItem. But if I take the AutoComplete out of the TabControl then everything works fine. How the TabControl can affect the behavior of the AutoComplete?


Priyanga Balasubramaniam [Syncfusion]
Replied On August 17, 2017 08:15 AM

Hi Alexey,

Thanks for your update.

We have checked the issue by using AutoComplete control inside our TabControlExt control and MS TabControl. But we could not reproduce the issue at our end. Please find the sample from the below location.

Sample:132097

Could you please modify this sample to reproduce the issue, it may help us to provide solution at the earliest?

Regards,
Priyanga B


Alexey Starkov
Replied On August 18, 2017 03:40 AM

I was able to reproduce the problem on your example. All works correctly only if the AutoComplete located is in the first tab. See attachment:



Attachment: 132097autoselect_2adaa197.zip

Priyanga Balasubramaniam [Syncfusion]
Replied On August 21, 2017 07:43 AM

Hi Alexey,

Thank you for your update.

We were able to reproduce the issue on our side and we have consider it as an issue. A support incident has been created to track the status of this issue 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,
Priyanga B

Alexey Starkov
Replied On August 21, 2017 08:18 AM

Ok, Thank you!


Priyanga Balasubramaniam [Syncfusion]
Replied On August 22, 2017 12:33 AM

Hi Alexey,

We request you to follow the incident for further follow-ups about the issue, which has been created under your account.

Regards,
Priyanga B

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.

;