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

DropDown speed display problem

7 Answers 153 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Christie Admin
Top achievements
Rank 1
Christie Admin asked on 08 Aug 2014, 02:42 PM
Hi,

actually with the control I have a FilteringBehavior which display only the items in the dropdown that contain what I typed. When I have a lot of items in the dropdown the control take some time to display the dropdown even of the MaxDropDownHeight property is set to 250 and I would like to know if it's possible to increase the speed of the popup display?!?

Thank's
Alain

7 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 12 Aug 2014, 03:03 PM
Hello Alain,

Thank you for contacting us.

When the RadAutoCompleteBox control is used with big data that has many items which would be matched by it's FilteringBehavior it is recommended to use the built-in AsyncFilteringBehavior The built-in filtering of the is triggered on each key stroke which in the case of big ItemsSource data may cause freeze delay when input is done fast. In those cases the previously mentioned AsyncFilteringBehavior is designed to eliminate such undesired behavior.

I created and attached a sample project which illustrates how the described behavior could be enabled. The AsyncFilteringBehavior has been tested with up to 200 000 matching items in it DropDown portion and little to no performance lose was observed. Hope this is helpful.


Regards,
Vladi
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Christie Admin
Top achievements
Rank 1
answered on 12 Aug 2014, 03:21 PM
Hi Vladi,

I'm little bit confused :) Actually in my project I have the following and I'm not sure to understand where I have to use it:

public class AutoCompleteBoxGroupingFilteringBehavior : FilteringBehavior
{
    ...
}

<UserControl.Resources>
        <ResourceDictionary>            
            <local:AutoCompleteBoxGroupingFilteringBehavior x:Key="FilteringBehavior" />
            ...
        </ResourceDictionary>
</UserControl.Resources>

        <telerik:RadAutoCompleteBox x:Name="RadAutoCompleteBox"
                                    FilteringBehavior="{StaticResource FilteringBehavior}"
                                    Style="{StaticResource CustomRadAutoCompleteBoxStyle}"                                    
                                    ItemsSource="{Binding Groups}"
                                    SelectionMode="Single"
                                    VerticalAlignment="Top"
                                    DisplayMemberPath="Description"
                                    AutoCompleteMode="Suggest"                                                                      
                                    TextSearchPath="Description"
                                    TextSearchMode="Contains"                                                                      
                                    SelectedItem="{Binding ItemFoundBySearch, Mode=TwoWay}"
                                    PreviewKeyUp="RadAutoCompleteBox_PreviewKeyUp"
                                    KeyUp="SearchAutoCompleteBox_KeyUp"
                                    Loaded="RadAutoCompleteBox_Loaded"
                                    SelectionChanged="SearchAutoCompleteBox_SelectionChanged"                                  
                                    SearchTextChanged="RadAutoCompleteBox_SearchTextChanged"
                                    MaxDropDownHeight="{Binding ElementName=Me, Path=MaxDropDownHeight}" />

Thank's
Alain
0
Vladi
Telerik team
answered on 14 Aug 2014, 01:16 PM
Hello Alain,

When customizing the built-in FilteringBehavior of the control as you mentioned all that is requires is to inherit the FilteringBehavior class and override it's methods. Because the AsyncFilteringBehavior is a more advanced and complicated filtering behavior customizing it is not possible with a simple inheritance. In order to create custom AsyncFilteringBehavior you will need to copy the code of the behavior and only customize the item matching function which is used by it. You could customize it's parallel filtering mechanism also but it would change the way the behavior is designed to work. I created and attached a sample project which demonstrates how to create such custom AsyncFilteringBehavior. In the sample project you can change the "match" function in the FindMatchingItems method to match your custom filtering needs.

As we see that it would be useful to be able to easily create a custom AsyncFilteringBehavior we will do our best to improve its implementation. We logged it as a feature request in our feedback portal where you can track it's status. In the current version of RadAutoCompleteBox the only possibility of creating a custom AsyncFilteringBehavior is by using the described above approach. Hope this is helpful.

Regards,
Vladi
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Christie Admin
Top achievements
Rank 1
answered on 18 Sep 2014, 08:20 PM
Hi Vladi,

Iactually have another post regarding what I'm trying to do with the control. I'm trying to build a control like iExplorer address bar... In the dropdown, I have groups, each group work like an expander, when the expander is collapse, I display 3 items, the the expander is expand, I display the rest of the items in the group. When I type some text in the textebox, all matching text which exist my group item, I want to hightlight them....

Is this possible with the AsyncFilteringBehavior?

Thank's
Alain
0
Kalin
Telerik team
answered on 23 Sep 2014, 11:12 AM
Hi Alain,

Can you please share some more details on what exactly you need to achieve? To highlight few items in the drop down or to highlight the matched text of the items (as shown in this example)? However if you need the first thing, I'm afraid the control can only highlight a single item from the drop down.

I'm looking forward to hearing from you.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Christie Admin
Top achievements
Rank 1
answered on 23 Sep 2014, 12:19 PM
Hi Kalin,

when the dropdown of my RadAutoCompleteBox appear, for each group, I place a RadExpander in the dropdown, by default, each RadExpander is collapsed to occupied less space as possible. When a group is collapse, I display only the first 3 items of the group, when the user expand the RadExpander, I display all the items of the group. In my other post, the Telerik team suggested to me the approach of changing the visibility of each items to COLLAPSE/VISIBLE depending of the state of the RadExpander. Also, when the user start typing in the RadAutoCompleteBox, I have a FilteringBehavior to filter only the items which contain the text entered by the user. Also, I have a logic to highlight only the portion of text in the items description only the portion of text which match the text entered by the user.

This solution work very well when I have a small amount of the items in the collection of the control but when I have a huge amount of data in the collection of my control, we start having a display speed problem and I would like to know if it's possible to acheive all of this using a AsyncFilteringBehavior ?!?

Thank's
Alain
0
Kalin
Telerik team
answered on 26 Sep 2014, 10:20 AM
Hi Alain,

I understand your concern. However in your case it won't be possible to use the AsyncFilteringBehavior as it cannot be customized in order to implement a custom Filtering (currently the class is sealed and cannot be inherited from). We have such Feature Request already logged in our Feedback portal, so you can easily vote and track the item on the following link:
http://feedback.telerik.com/Project/143/Feedback/Details/135863-make-it-possible-to-customize-the-built-in-asyncfilteringbehavior-by-inheriting-i

Hope this helps.

Regards,
Kalin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
AutoCompleteBox
Asked by
Christie Admin
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Christie Admin
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or