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

PropertyGrid Reset of SearchBox

2 Answers 70 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Zamel
Top achievements
Rank 1
Zamel asked on 17 Aug 2012, 07:05 AM
Hello,

I'm trying to reset or clear the value on the search box of my propertygrid when window is closed. Currently, this is how it works:

  1. User clicks on a button that pops up a RadWindow with the PropertyGrid in it that displays data.
  2. Search while you type feature of the propertygrid is enabled, so user can search for values on the window.
  3. User types in a value for search in the built in search box of the propertygrid, then it automatically filter the display in the propertygrid depending on the value being searched.
  4. User closes the window WITHOUT removing the value entered in the search box of the propertygrid.
  5. User opened again the window and voila, the value in the search box remains and display is still filtered.

Now, that is what I'm trying to fix, reset the search box value or clear the search box so when the window is opened again, the display is not filtered anymore, instead show all values. Is there any way to do this? Do you have suggestions?

I found this online:

    radPropertyGrid1.PropertyGridElement.ToolbarElement.SearchTextBoxElement.Text = "";
However, it is for RadControls for WinForms and I am using Silverlight. I'm looking for a way similar to that. Hope you can help me with it.

Thank you.

2 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Ivanov
Telerik team
answered on 17 Aug 2012, 02:16 PM
Hello,

You may try the following approach:
rpg.ChildrenOfType<PropertyGridPresenter>().First().FilterText = "a";


Kind regards,
Ivan Ivanov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Zamel
Top achievements
Rank 1
answered on 23 Aug 2012, 08:26 AM
Your solution is perfect!!!! Thank you so much!! :)
Tags
PropertyGrid
Asked by
Zamel
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Zamel
Top achievements
Rank 1
Share this question
or