Rad ComboBox Filter text

6 posts, 2 answers
  1. HKJ
    HKJ avatar
    5 posts
    Member since:
    Sep 2015

    Posted 23 Sep 2015 Link to this post

    Hello all,

    I am using ComboBox with multi check box and Filter option. I would like to know how can I get text which i gave in input area (for filtering) in code behind.

     

    For example, if i have a combobox which shows all the countries -> typed "Ge" input area. Then menu/option in the dropdown with filter accordingly.

    Now my requirment is How will i get the string "Ge" in code behind (in any event) and i prefer to do this code behind rather JS.

     

    I hope this makes sense and looking forward for its solution...

     

    Thankz

  2. Answer
    Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 28 Sep 2015 Link to this post

    Hello,

    You can access the text typed by the user in the input field in the RadComboBox TextChanged server-side event as shown below:
    protected void RadComboBox1_TextChanged(object sender, EventArgs e)
    {
        string text = (sender as RadComboBox).Text;
    }

    More information about this event and the conditions under which it fires is available in the TextChanged documentation article.

    Regards,
    Ivan Danchev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. HKJ
    HKJ avatar
    5 posts
    Member since:
    Sep 2015

    Posted 28 Sep 2015 in reply to Ivan Danchev Link to this post

    Dear Admin,

     Thank you very much for your reply.

     

    I tried this one and unfortunately its not working. It gives the text of the first item in the list rather the text/string which I typed.

    For example, if Australia is the first item in the dropdown,  "(sender as RadComboBox).Text;" gives value 'Australia. I need to get the text i type in to filter the menu

     

    Looking forward to hear from you soon.

     

     

    Regards,

    Hari

     

  5. Answer
    Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 30 Sep 2015 Link to this post

    Hello Hari,

    The typed text will be available in TextChanged event handler if you click outside the ComboBox or hit Enter as explained in the linked article. You can see a short video that demonstrates getting the typed text. If you select an item from the returned result after entering the text, this Item's Text will be returned in the handler.

    Regards,
    Ivan Danchev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. HKJ
    HKJ avatar
    5 posts
    Member since:
    Sep 2015

    Posted 30 Sep 2015 in reply to Ivan Danchev Link to this post

    Dear Ivan,

     

    Thank you very much for your support... It worked...

    The missing part was """"  AllowCustomText ="true"  """"

     

    Thank you once again 

     Regards,

    Hari

  7. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 02 Oct 2015 Link to this post

    Hello Hari,

    I am glad it worked out at your end as well and you are now able to get the entered text. 

    Regards,
    Ivan Danchev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017