This is a migrated thread and some comments may be shown as answers.

Suggest content per word instead of the whole textbox content

13 Answers 57 Views
AutocompleteBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Peter
Top achievements
Rank 2
Peter asked on 06 Jan 2013, 11:11 AM
Hi Telerik Team,

How can i implement to show suggestions per word, currently it will match the whole context of the control.

Additionally, I don't want  the autocompletebox to loose focus once user has chose a suggestion item. Currently when the user chose a suggestion it will loose focus and you have to click the control again to type more info.
I tried setting the .focus() method in the suggestionselected() event but it does not return to focus.

13 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 07 Jan 2013, 08:52 AM
Hello Peter,

I am pasting here the answer to the support ticket targeting the same questions:

1. The suggesting-per-word feature is currently not available. Since we have had requests for this feature before we will log it in the TODO list for our next release and will implement it.

2. Currently maintaining the focus in RadAutoCompleteBox after selecting a suggestion item will be a bit tricky. Internally we handle the GotFocus and LostFocus events and perform some logic which also handles the visibility of the suggestions popup. You can use a Dispatcher in the SuggestionSelected event to re-focus the AutoCompleteBox but this will make the suggestions popup reappear as internally the controls considers the Focused state equal to typing into the control.

Let me know should you have further questions or need assistance.

Regards,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Andrey
Top achievements
Rank 1
answered on 18 Mar 2014, 01:15 PM
Hello, more that a year have passed, and as stated in documentation suggesting-per-word is still unavailable? Am i right? Are you planning to implement that?
If i got that correct, this can be done by implementing Custom IFilteringBehavior that is avalable in SL and WPF controls, but not WP :(
Thank you
0
Victor
Telerik team
answered on 21 Mar 2014, 09:01 AM
Hi Andrey,

Thanks for writing.
I am afraid that this feature has not yet been implemented. We have had only a few requests for this so the priority for this has been low. Is this feature critical for you? If it is we will see if we can elevate its priority so that it doesn't get lost among the higher priority tasks we have currently planned.

Regards,
Victor
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Andrey
Top achievements
Rank 1
answered on 08 Apr 2014, 10:31 AM
Hello Victor.
Yes this feature is pretty critical for us. Since we're developing app for retail, there always long complicated and often similar to each other names for goods. So users want to search by short words devided by spaces. Eg: "peps cher 12"  for "Wild Cherry Pepsi 12 FL OZ" among all varieties of sizes and flavors of pepsi.
Frankly its surprising for me that this feature is not so popular.
Its will be so great if you will implement that
Thank you
0
Andrey
Top achievements
Rank 1
answered on 09 Apr 2014, 03:06 PM
Btw also seems like RadAutocompleteBox have same issue with memory leak like described about regular MS autocomplete http://social.msdn.microsoft.com/Forums/wpapps/en-US/785f3ff7-6f89-4faf-9d2e-f8e28b6fb0a1/autocompletebox-memory-leak?forum=wptools
Its easy to reproduce with telerik component just like in example from link.
Looks like the problem is some Strong referenced events, but you cant unsubscribe or disable them till they are private.
Shall i open ticket or new thread for that?
Thank you.
0
Deyan
Telerik team
answered on 11 Apr 2014, 07:10 AM
Hi Andrey,

Putting a Dispatcher call in the destructor of an object doesn't sound like a good idea. Can you simply try the same scenario by putting a brakepoint in the finalizer instead of any further code and see if it gets called?

Regards,
Deyan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Andrey
Top achievements
Rank 1
answered on 11 Apr 2014, 08:31 AM
I was testing by making debug.writeline in Destructor, i think its not the case `cos i was testing total memory usage and there really is a leak when closing page. Only workaround i can make now is to create AutoCompleteBox from code only when it needed.
0
Andrey
Top achievements
Rank 1
answered on 14 Apr 2014, 09:34 AM
Hello, have you tried to repro this issue?
0
Deyan
Telerik team
answered on 16 Apr 2014, 07:35 AM
Hello Andrey,

Thanks for writing back.

I have not managed to reproduce the issue. What I did is:

1. Create a new Windows Phone project with two pages, the second containing an AutoCompleteBox.
2. Navigate from the first page to the second one and use the back button to return to the first page.
3. Put a breakpoint in the second page's destructor.

The result was:

after navigating back and forth between the two pages approximately 20 times, the destructor of the second page got called 20 times.

So, what happens is that the Garbage Collector triggers according to the memory usage and the requirements of the app. A problem with memory would exist if you manage to cause an OutOfMemory exception leading to application crash. In that case we will have to investigate further.

I hope this is helpful.

Regards,
Deyan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Andrey
Top achievements
Rank 1
answered on 17 Apr 2014, 02:46 PM
Look, i've reproduced example with new simple out-of-box project and it really works.
The reason - in new project a classic navigation system is used with NavigationService.Navigate(new Uri("/Page1.xaml", UriKind.Relative));
But in my project i'm using mvvm aproach with our own navigation service:
Navigating to page (lots of code, but key is here):
...
var viewModel = CreateViewModel<TViewModel>(args);
var page = CreatePage<TPage>(viewModel);
this.pagePresenter.Children.Add(page);
....

navigating from:
...
 pagepresenter.Children.Remove(page);
...

Also i'm making lots of subcribtions , unsubscriptions, attaching appbar, using journal, as i said lots of code here (old code from wp7)
But the key is - everything works just fine on very complicated views and viewmodels when im not using RadAutoComplete. Views and VM objects destructed properly, but when im adding even clear RACB even with no itemsource - it prevents VM from destruction. What could be the case? May be some global event subscriptions (???)
0
Andrey
Top achievements
Rank 1
answered on 17 Apr 2014, 02:50 PM
btw OutOfMemory exception - exactly what i  get if im opening like 15 pages.
Btw im using GC.Collect(); GC.WaitForPendingFinalizers(); in testing.
0
Deyan
Telerik team
answered on 22 Apr 2014, 07:43 AM
Hi Andrey,

Thanks for writing back.

So in that particular case with your custom navigation approach we will have to look at your code. If you manage to send us a sample application that exactly replicates what you are doing by using your APIs, we will try to debug it for you and see how we can help.

You will need to open a new support ticket to do this.

Regards,
Deyan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Andrey
Top achievements
Rank 1
answered on 06 May 2014, 03:18 PM
Hello, i created ticket no 816748
Tags
AutocompleteBox
Asked by
Peter
Top achievements
Rank 2
Answers by
Deyan
Telerik team
Andrey
Top achievements
Rank 1
Victor
Telerik team
Share this question
or