how to get RadAutoCompleteBox DataValueField value from clientside?

6 posts, 0 answers
  1. Muhammad
    Muhammad avatar
    1 posts
    Member since:
    Oct 2012

    Posted 16 Oct 2013 Link to this post




    I need DataValueField value from clientside. how to retieve RadAutoCompleteBox   DataValueField value from clientside? 

  2. Dess
    Admin
    Dess avatar
    1605 posts

    Posted 21 Oct 2013 Link to this post

    Hello Muhammad,

    Thank you for contacting Telerik Support.

    If I understand correctly, your requirement is to get the RadAutoCompleteBox value (the selected items). The selected items in the control can be found in the Items collection. Each item contains text and value, so you can get both the display and the value member.
    private void Form1_Load(object sender, EventArgs e)
    {
        this.customersTableAdapter.Fill(this.nwindDataSet.Customers);
     
        this.radAutoCompleteBox1.AutoCompleteDataSource = bindingSourceCustomers;
        this.radAutoCompleteBox1.AutoCompleteDisplayMember = "ContactName";
        this.radAutoCompleteBox1.AutoCompleteValueMember = "CustomerID";
    }

    string itemText = this.radAutoCompleteBox1.Items[0].Text;
    object itemValue = this.radAutoCompleteBox1.Items[0].Value;

    If it is not the exact scenario that you are looking for, I would really appreciate more details about the specific requirements.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ruben
    Ruben avatar
    2 posts
    Member since:
    May 2016

    Posted 24 Jun in reply to Dess Link to this post

    .Items not exist

     

  5. ghini
    ghini avatar
    25 posts
    Member since:
    Sep 2012

    Posted 25 Jun in reply to Ruben Link to this post

    try with radAutoCompleteBox1.Entries[0].Value
  6. Ruben
    Ruben avatar
    2 posts
    Member since:
    May 2016

    Posted 25 Jun in reply to ghini Link to this post

    Thanks, I will try
  7. Dess
    Admin
    Dess avatar
    1605 posts

    Posted 27 Jun Link to this post

    Hello Ruben,

    Thank you for writing. 

    I have attached a sample project for your reference demonstrating how to retrieve the value of RadAutoCompleteBox. Note that it is applicable to the latest version.

    I hope this information helps. Should you have further questions I would be glad to help.

     Regards,
    Dess
    Telerik
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Back to Top
UI for WinForms is Visual Studio 2017 Ready