PropertyGrid Reset of SearchBox

3 posts, 1 answers
  1. Zamel
    Zamel avatar
    20 posts
    Member since:
    Aug 2012

    Posted 17 Aug 2012 Link to this post

    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. Answer
    Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 17 Aug 2012 Link to this post

    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.

  3. DevCraft banner
  4. Zamel
    Zamel avatar
    20 posts
    Member since:
    Aug 2012

    Posted 23 Aug 2012 Link to this post

    Your solution is perfect!!!! Thank you so much!! :)
Back to Top