WPF RADComboBox

8 posts, 0 answers
  1. Akhil
    Akhil avatar
    4 posts
    Member since:
    Sep 2010

    Posted 22 Sep 2010 Link to this post

    Hi,

    I was looking RadComboBox trial version. Do you know how I can open the dropdown when we start typing not on the OpenDropDownOnFocus?

    Thanks,
    Akhil
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 22 Sep 2010 Link to this post

    Hello Akhil,

    Yesterday I posted a simple example demonstrating how to open RadComboBox when the user starts typing:
    http://www.telerik.com/community/forums/silverlight/combobox/autocomplete-dropdown-list-error.aspx

    It is for Silverlight, but the code should work in WPF without modifications.

    Regards,
    Valeri Hristov
    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. UI for WPF is Visual Studio 2017 Ready
  4. Akhil
    Akhil avatar
    4 posts
    Member since:
    Sep 2010

    Posted 22 Sep 2010 Link to this post

    Thanks Valeri. I'm creating control runtime not in the design time and I cannot write converter for that because it's in common content control. Do you know any other way?

    Thanks,
    Akhil
  5. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 23 Sep 2010 Link to this post

    Hello Akhil,

    You could create the binding in the code-behind. Something like this:

    var comboBox = new RadComboBox();
    ... code to initialize the combobox ...
    comboBox.SetBinding(IsDropDownOpenProperty, new Binding("Text")
    {
    Source = comboBox,
    Converter = new TextToDropDownOpenConverter(),
    Mode = BindingMode.TwoWay
    });

    Kind regards,
    Valeri Hristov
    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. Akhil
    Akhil avatar
    4 posts
    Member since:
    Sep 2010

    Posted 23 Sep 2010 Link to this post

    Hello Valeri,

    I used the code as you suggested now the problem are
    1. I cannot close drop down combo box after select text.
    2. I have two combo box in one screen both by default coming as as open combobox taht i don't want.

    Please look the my code and let me know what I'm missing

     

     

    RadComboBox cb = new RadComboBox();

     

    bndi =

     

    new Binding("CvlItems");

     

    cb.SetBinding(

     

    RadComboBox.ItemsSourceProperty, bndi);

     

    bndv.ConverterParameter =

     

    "ComboBox";

     

    cb.SetBinding(

     

    RadComboBox.SelectedItemProperty, bndv);

     

    cb.SetBinding(

     

    RadComboBox.IsEnabledProperty, bnde);

     

    cb.SetBinding(

     

    RadComboBox.HeightProperty, bndh);

     

    cb.SetBinding(

     

    RadComboBox.WidthProperty, bndw);

     

    cb.DisplayMemberPath =

     

    "DisplayValue";

     

    cb.SetBinding(

     

    RadComboBox.IsDropDownOpenProperty, new Binding("Text")

     

    {

    Source = cb,

    Converter =

     

    new TextToDropDownOpenConverter(),

     

    Mode =

     

    BindingMode.TwoWay

     

    });

    cb.TextSearchMode =

     

    TextSearchMode.Contains;

     

    cb.CanAutocompleteSelectItems =

     

    true;

     

    cb.CanKeyboardNavigationSelectItems =

     

    true;

     

    cb.IsFilteringEnabled =

     

    true;

     

    cb.OpenDropDownOnFocus =

     

    true;

     

    cb.IsEditable =

     

    true;

     

     

     

    return cb;


    Please see the attached file also.

    Thanks,
    Akhil

     

  7. George
    Admin
    George avatar
    1332 posts

    Posted 28 Sep 2010 Link to this post

    Hello Akhil,

    You code looks fine. Could you please send us a running sample that reproduces the problem with these two RadComboBox controls. It will shed some light on the current issue and it would be very helpful to investigate the problem.

    I will be glad to assist you further.  

    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
  8. Akhil
    Akhil avatar
    4 posts
    Member since:
    Sep 2010

    Posted 28 Sep 2010 Link to this post

    Hi,

    I cannot create sample project, it's very complicated to make sample project.

    I think the problem in "TextToDropDownOpenConverter"
    (http://www.telerik.com/community/forums/silverlight/combobox/autocomplete-dropdown-list-error.aspx) class,
    when you enter or type in combobox it's set  RadComboBox.IsDropDownOpenProperty always true or select combobox value by mouse will set always true.

     

    cb.SetBinding(RadComboBox.IsDropDownOpenProperty, new Binding("Text")
                        {
                            Source = cb,
                            Converter = new TextToDropDownOpenConverter(),
                            Mode = BindingMode.TwoWay
                        });
     

     

     

      

    I tried also cb.StaysOpenOnEdit = true but no luck.  

    Any thoughts how to fix converter or any other idea?

  9. George
    Admin
    George avatar
    1332 posts

    Posted 04 Oct 2010 Link to this post

    Hi Akhil,

    Unfortunately, this implementation is not supported in WPF. Sorry for any inconvenience caused.

    Please do not hesitate to contact us if you require any further information.


    Sincerely yours,
    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
Back to Top
UI for WPF is Visual Studio 2017 Ready