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

telerik:textsearch.textpath from code behind

7 Answers 217 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Sven
Top achievements
Rank 1
Sven asked on 15 Sep 2011, 03:02 PM
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 

7 Answers, 1 is accepted

Sort by
0
Pana
Telerik team
answered on 20 Sep 2011, 08:00 AM
Hi Sven,

It is an attached property and you could set it like that:

using Telerik.Windows.Controls;

TextSearch.SetTextPath(this.Combo, "MyProperty");

However I am not sure that runtime change is well supported. I hope it will work for you.

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
Yana
Telerik team
answered on 31 Jul 2012, 10:10 AM
Hello Robert,

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
Nasko
Telerik team
answered on 15 Jan 2016, 08:21 AM
Hi Edmund,

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.
Tags
ComboBox
Asked by
Sven
Top achievements
Rank 1
Answers by
Pana
Telerik team
Robert
Top achievements
Rank 1
Yana
Telerik team
Edmund Covington
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or