RadComboBox as a search textbox deletes text

6 posts, 0 answers
  1. Abdulrahman Omran
    Abdulrahman Omran avatar
    15 posts
    Member since:
    Jan 2011

    Posted 07 Apr 2011 Link to this post

    Hi,

    I have implemented a search textbox functionality using a radcombobox. The way I do it is by lisening to the KeyUp event and get the text property and perform a search using the text displayed on the combobox. The itemsSource property is bound to a collection called Managers.

    My simple search function will get the first 10 records from the database that match the search text and store them to the Managers collection.

    Now Im running into a small issue which is "disappearing" text from the combobox.
    Here is how the issue occurs:
    1) say the current selected manager is called Albert and the itemsSource collection includes 3 record {Albert, Alan, Andre}.
    2) The user then performs a search by entering the character 'b' this will get 10 manager record that start with 'b'.
    3) the itemsSource doesn't contain Albert anymore. Therefore the SelectedItem is set to null
    4) The combobox text will be cleared.
    5) how this is an issue? if the user now types the character 'e' my search function will find record starting with 'e' instead of the sequence 'be'


    I hope there is an easy work-around. I will appreciate any helpful feedback.


    Regards,
    Abdul
  2. George
    Admin
    George avatar
    1332 posts

    Posted 13 Apr 2011 Link to this post

    Hello,

     
    Please, refer to the following forum thread, where you can find an additional information about this problem - http://www.telerik.com/community/forums/silverlight/combobox/changing-itemsource-with-selectedvalue-binding.aspx

    The RadComboBox is not designed to work in this way ( I suppose you use WCF/RIA Services and get the result from a database). We have an example that shows how to accomplish such scenario. Attached you can find it.

    I hope this helps.

    Kind regards,
    George
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Abdulrahman Omran
    Abdulrahman Omran avatar
    15 posts
    Member since:
    Jan 2011

    Posted 13 May 2011 Link to this post

    Hi George,

    I have tried the sample solution you have attached but it also has the same issue.
    I read the code and I think it tries to solve this issue by adding the current selected item to the items source b4 it updates.
    However this doesn't completely solve the issue as the textChanged (the new value will be the selected item's text) event will still be raised after the items source is updated triggering another search. You can try the solution to observe the same behavior.

    A searchable comboBox that contacts the server to get it's results is a really desirable behavior and I hope in future releases Telerik will provide an out of the box controller to achieve such functionality. For the time being we have to do with a few workarounds.

    I have seen that the desired behavior has been achieved on the weather demo. I'm going to analyze the code on the demo to achieve a similar functionality.

    For the time being, I would still appreciate any feedback. : )

    I'm sorry for my late reply.


    Kindest Regards,
    Abdul
  5. George
    Admin
    George avatar
    1332 posts

    Posted 20 May 2011 Link to this post

    Hello,

     
    We are targeting this problem in our further releases, but we cannot say a current release date for now. Please do not hesitate to contact us if you require any further assistance.


    Kind regards,
    George
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  6. Simon
    Simon avatar
    47 posts
    Member since:
    May 2008

    Posted 21 Mar 2012 Link to this post

    Has this problem been solved?
    We're almost a year on.
  7. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 26 Mar 2012 Link to this post

    Hi Simon,

    Since the RadComboBox is not designed to work like this, we decided to create an AutoCompleteBox which main functionality will be exactly this. However, for now I cannot give you a release date when this control will be available - if we manage to include it in the next Q, it will be announced publicly.

    Greetings,
    Konstantina
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top
DevCraft banner