12 Answers, 1 is accepted
In WPF you can use TextBoxBase.TextChanged event. So just set in xaml:
TextBoxBase.TextChanged="combo1_TextChanged"
Let me know if you need more help.
All the best,
Boyan
the Telerik team
If you want to reduce the size of your Silverlight application, you should check our latest Silverlight tool online - Assembly Minifier (http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx)

TextBoxBase.TextChanged is an attached property. Your XAML will look like this:
<
telerikInput:RadComboBox
Height
=
"20"
Width
=
"200"
x:Name
=
"combo"
TextBoxBase.TextChanged
=
"combo_TextChanged"
>
Let me know if you have further questions.
Best wishes,
Boyan
the Telerik team

how can I do everything in code behind?
Thanks

this
.comboBox.AddHandler(TextBoxBase.TextChangedEvent,
new
RoutedEventHandler((o,e) =>
{
var currentText =
this
.comboBox.Text;
// do something now...
}));
Yes this is will do, you can attach to the event in code this way. If you are having problems making it work, we will be glad to help.
Kind regards,
Boyan
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Hi,
I have trying to apply the same event on my radcombobox as well but seems like textchangedevent is no longer available
<telerik:RadComboBox x:Name="rcboDocSize" DisplayMemberPath="FontSizeName" IsEditable="True" MaxDropDownHeight="190" Width="70" SelectionChanged="rcboDocSize_SelectionChanged" StaysOpenOnEdit="True" />​
when i typedin it says, The property 'TextChanged' was not found in type 'RadComboBox'. Any help about this?
RadComboBox does not support TextChanged event by design. However, you have two appraoches that you could use in order to achieve the desired.
The first one is the proposed by Boyan below to use the TextBoxBase.TextChanged attached property:
<
telerik:RadComboBox
x:Name
=
"rcboDocSize"
DisplayMemberPath
=
"FontSizeName"
IsEditable
=
"True"
MaxDropDownHeight
=
"190"
Width
=
"70"
SelectionChanged
=
"rcboDocSize_SelectionChanged"
StaysOpenOnEdit
=
"True"
TextBoxBase.TextChanged
=
"radComboBox_TextChanged"
/>​
and in code - behind:
private
void
radComboBox_TextChanged(
object
sender, TextChangedEventArgs e)
{
//implement custom logic here
}
The second approach that you could use to handle to the TextChanged event is to get the TextBox placed inside RadComboBox using the ChildrenOfType method (inside the Loaded event) and handle its TextChanged event:
private
void
radComboBox_Loaded(
object
sender, RoutedEventArgs e)
{
var combo = sender
as
RadComboBox;
var textBox = combo.ChildrenOfType<TextBox>().FirstOrDefault();
if
(textBox !=
null
)
{
textBox.TextChanged += textBox_TextChanged;
}
}
void
textBox_TextChanged(
object
sender, TextChangedEventArgs e)
{
//implement custom logic
}
Hopes this helps.
Regards,
Nasko
Telerik

Thanks for the reply Nasko..
I have added the TextBoxBase.TextChanged="radComboBox_TextChanged" however it gives me this error on the xaml file:
'The attachable property 'TextChanged' was not found in type 'TextBoxBase'
Am i missing header or something in the xaml?
I have also tried working with the loaded event but it throws me a framework element error..
Thanks in advance. Your help is very much appreciated.
We tried to reproduce the observed by you error but it seems everything works as expected on our side.
I am attaching you a sample project that demonstrates the approach with the TextBoxBase.TextChanged attached event - please, check it.
Hopes this helps.
Regards,
Nasko
Telerik

How can I attach this event to a reactive linq event like this:
var input = (from evt in Observable.FromEventPattern(myradcombobox, "TextChanged")
var input = (from evt in Observable.FromEventPattern(myradcombobox, "TextBoxBase.TextChanged")
Both throws error that it's not found.
I checked this on my side and I hit the following error - "Could not find event 'TextChanged' on object of type 'Telerik.Windows.Controls.RadComboBox'.". I am not familiar with the Reactive Linq framework but I will guess that the FromEventPattern method is searching for direct events only. And since the TextChanged is not an event of RadComboBox you can't get the proper event pattern.
To achieve your requirement you can subscribe the Loaded event of the combobox where you can get the TextBox element and use the reactive linq on it.
private
void
Combobox_Loaded(
object
sender, RoutedEventArgs e)
{
var textBox =
this
.combobox.FindChildByType<TextBox>();
var input = from evt
in
Observable.FromEventPattern(textBox,
"TextChanged"
) select evt;
}
Regards,
Martin Ivanov
Progress Telerik