AutoComplete on TextBox?

4 posts, 1 answers
  1. Josh Anderson
    Josh Anderson avatar
    83 posts
    Member since:
    Dec 2005

    Posted 02 May 2008 Link to this post

    As I'm sure you can tell by my recent posts, I've been playing around with the controls for Windows Forms, and I noticed today that the RadTextBox does not include an ability to bind to an autocomplete source like the standard TextBox does.  Is there another way to accomplish this?  One of my RadTextBox controls is for URL entry, and I'd like the option to tie it to the user's history for autocomplete.

    Josh
  2. Answer
    Kiril
    Admin
    Kiril avatar
    158 posts

    Posted 05 May 2008 Link to this post

    Hello Josh Anderson,

    Thank you for writing.

    The Autocomplete functionality is available witin the RadTextBox. This example shows how to access it, via a simple example. Please refer to the code-segment below:

    1             TextBox tb = ((TextBox)((RadTextBoxItem)radTextBox1.RootElement.Children[0].Children[0]).HostedControl);  
    2             tb.AutoCompleteCustomSource.AddRange(new string[] {  
    3             "blabla",  
    4             "mlamla",  
    5             "clacla"});  
    6             tb.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Append;  
    7             tb.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource; 

    Thank you for directing our attention to this functionality. In the upcoming service pack, this functionality will be available at the top-level of the control. There will be no difference in the way you would use a Microsoft TextBox and a Telerik RadTextBox with respect to this functionality.

    If you have any additional questions, let us know. We'd love to help you get acquainted with what our product has to offer.

    All the best,
    Kiril
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ryan
    Ryan avatar
    25 posts
    Member since:
    Jul 2008

    Posted 20 Aug 2008 Link to this post

    Would you be willing to post the VB version of this?

    Ryan
  5. Ryan
    Ryan avatar
    25 posts
    Member since:
    Jul 2008

    Posted 20 Aug 2008 Link to this post

    Nevermind.

    Got it worked out....

    Dim

    tb As TextBox

    tb =

    DirectCast(DirectCast(tb_City.RootElement.Children(0).Children(0), RadTextBoxItem).HostedControl, TextBox)

Back to Top