Hi guys,
I am wondering if there is a way to programatically assign telerik:textsearch.textpath from code behind. I have a RadComboBox that gets different itemsource based on other conditions and at some cases I assign a custom template that I would like to allow the user to still be able to search.
Thanks in advance
SD
I am wondering if there is a way to programatically assign telerik:textsearch.textpath from code behind. I have a RadComboBox that gets different itemsource based on other conditions and at some cases I assign a custom template that I would like to allow the user to still be able to search.
Thanks in advance
SD
7 Answers, 1 is accepted
0
Hi Sven,
It is an attached property and you could set it like that:
Greetings,
Pana
the Telerik team
It is an attached property and you could set it like that:
using Telerik.Windows.Controls;
TextSearch.SetTextPath(this.Combo, "MyProperty");
Greetings,
Pana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Robert
Top achievements
Rank 1
answered on 26 Jul 2012, 11:24 AM
I wonder if there's also a way to do that in Visual Basic 2010? Thanks for your help!
0
Hello Robert,
Have you tried it like this:
All the best,
Yana
the Telerik team
Have you tried it like this:
TextSearch.SetTextPath(
Me
.Combo,
"MyProperty"
)
All the best,
Yana
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Robert
Top achievements
Rank 1
answered on 01 Aug 2012, 07:09 AM
That's it, thanks. I was missing the right assembly (Telerik.Windows.Controls).
0
Edmund Covington
Top achievements
Rank 1
answered on 12 Jan 2016, 11:26 AM
How do you set the TextSearch.Text property when you are creating a FrameworkElementFactory item as a type of ComboBox?
FrameworkElementFactory comboElement = new FrameworkElementFactory(typeof(RadComboBox));
0
Hi Edmund,
Please, check the following code for setting the TextSearchPath and let us know if it worked for you:
Hope this helps.
Regards,
Nasko
Telerik
Please, check the following code for setting the TextSearchPath and let us know if it worked for you:
FrameworkElementFactory combo =
new
FrameworkElementFactory(
typeof
(RadComboBox));
combo.SetValue(Telerik.Windows.Controls.TextSearch.TextPathProperty,
"My Property"
);
Hope this helps.
Regards,
Nasko
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
0
Edmund Covington
Top achievements
Rank 1
answered on 15 Jan 2016, 03:28 PM
That's great. Thanks very much.