This is a migrated thread and some comments may be shown as answers.

WPF RADComboBox

7 Answers 232 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Akhil
Top achievements
Rank 1
Akhil asked on 22 Sep 2010, 07:15 PM
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

7 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 22 Sep 2010, 07:31 PM
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
0
Akhil
Top achievements
Rank 1
answered on 22 Sep 2010, 07:38 PM
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
0
Valeri Hristov
Telerik team
answered on 23 Sep 2010, 08:31 AM
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
0
Akhil
Top achievements
Rank 1
answered on 23 Sep 2010, 05:01 PM
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

 

0
George
Telerik team
answered on 28 Sep 2010, 03:21 PM
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
0
Akhil
Top achievements
Rank 1
answered on 28 Sep 2010, 05:25 PM
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?

0
George
Telerik team
answered on 04 Oct 2010, 02:35 PM
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
Tags
ComboBox
Asked by
Akhil
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Akhil
Top achievements
Rank 1
George
Telerik team
Share this question
or