dynamic load

9 posts, 0 answers
  1. Raphaël MANSUY
    Raphaël MANSUY avatar
    26 posts
    Member since:
    May 2005

    Posted 26 Jul 2012 Link to this post

    Hi,

    Your new control is great ;)
    I'd like to load the dropdown's items dynamically when the user types letters. So each time the user types a letter, a callback would be made to load the dropdown's content.
    Is there a built-in feature for that? otherwise, what would be the easiest way to achieve that?
    Thanks
  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 02 Aug 2012 Link to this post

    Hello  Raphael,

    RadAutoCompleteBox works just the way you have described, it filters the datasources using a callback after each letter the user has type. You can easily verify that using a tool like fiddler or FireBug. Are there any issues that you have faced upon using the callback filtering?

    Kind regards,
    Genady Sergeev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Raphaël MANSUY
    Raphaël MANSUY avatar
    26 posts
    Member since:
    May 2005

    Posted 02 Aug 2012 Link to this post

    No, it's fine. I hadn't look in details to your control ;)
  5. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 03 Aug 2012 Link to this post

    Hi Raphael,

    We are glad that you like it. :) Don't hesitate to drop us a line if you face any issues with the AutoCompleteBox.

    Greetings,
    Genady Sergeev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Darren
    Darren avatar
    14 posts
    Member since:
    Sep 2012

    Posted 20 Sep 2012 Link to this post

    I am having a rough time doing what you are describing here.

    For example, I'm creating an employee search where I have close to 20,000 employees to load. Of course, I don't want to load all 20,000 employees when the page loads. I don't want to load any data until the user starts to type. I tried to do this using a parameter (that was bound to the RadAutoCompleteBox control) of the sql data source control the RadAutoCompleteBox is bound to. Because the RadAutoCompleteBox is empty when the page loads, it goes out and pulls all the records which takes quite a while. Also, when the user starts to type, no results start to show up for about 30 seconds. 

    My first thought is to somehow tell the RadAutoCompleteBox not to load data or filter anything until the user types in at least 3 characters. Is this possible? 

    Also, the TextChanged event doesn't seem to fire and I have autopostback set to true. Because of this, it doesn't seem to be updating the where clause the sql data source is using dynamically. 

    Thanks guys! 

  7. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 25 Sep 2012 Link to this post

    Hi Raphael,

    When TextMode is set to token AutoCompleteBox will not fire the Text_Changed event. However, you can still access the text entered in the auto complete via its Text property. Then you can use that text to filter the data source before assigning it to the AutoCompleteBox. Here is example code:

    protected void Page_Init(object sender, EventArgs e)
        {
            if (Page.IsCallback)
            {
                AutoCompleteBox1.DataSource = FilteraDataBase(AutoCompleteBox1.Text);
            }
        }


    Greetings,
    Genady Sergeev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  8. Lee Nessling
    Lee Nessling avatar
    9 posts
    Member since:
    Aug 2008

    Posted 07 Jan 2015 in reply to Genady Sergeev Link to this post

    I'm attempting to filter the datasource based on the Text in the Autocomplete, however AutoCompleteBox1.Text = ""

    I don't see how to retrieve the Text of what the user keyed to filter the result set.

  9. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 12 Jan 2015 Link to this post

    Hi Lee,

    AutoCompleteBox should filter the text automatically. Can you paste your code here? 

    Thanks.

    Regards,
    Hristo Valyavicharski
    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.

     
  10. Lee Nessling
    Lee Nessling avatar
    9 posts
    Member since:
    Aug 2008

    Posted 14 Jan 2015 in reply to Hristo Valyavicharski Link to this post

    Either I didn't see it before, or it's new since I first coded these controls, but I fixed the issue by using DataSourceSelect
     event.

    The new code is now :    

      void AutoCompleteBox_DataSourceSelect(object sender, Telerik.Web.UI.AutoCompleteBoxDataSourceSelectEventArgs e)
            {
                AutoCompleteBox.DataSource = GetDataSource(e.FilterString);
            }
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017