# Programmatically Clear Dropdown Filter

**URL:** <https://forum.radzen.com/t/programmatically-clear-dropdown-filter/5555>\
**Category:** Radzen.Blazor Components\
**Created:** [November 9, 2020, 2:48pm UTC](https://forum.radzen.com/t/programmatically-clear-dropdown-filter/5555 "2020-11-09T14:48:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![greenmtvince](https://forum.radzen.com/user_avatar/forum.radzen.com/greenmtvince/32/4944_2.png) [@greenmtvince](https://forum.radzen.com/u/greenmtvince)\
**Post date:** [November 9, 2020, 2:48pm UTC](https://forum.radzen.com/t/programmatically-clear-dropdown-filter/5555/1 "2020-11-09T14:48:54Z")

</div>

Is there a way to programmatically clear the the dropdown filter?

I want a behavior where the user can reset the form. Clearing the bound data doesn't seem to have an impact on the filter. Running my own JS to clear the filter text, doesn't change the displayed items, and running JS to clear the displayed items breaks the component.

If there's some general Blazor trick to reset the component not specific to Radzen, I'm all ears for that too.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [November 9, 2020, 3:29pm UTC](https://forum.radzen.com/t/programmatically-clear-dropdown-filter/5555/2 "2020-11-09T15:29:25Z")

</div>

Check this thread:

> [@Programatically clear search in RadzenDropDown and DropDownDataGrid](http://forum.radzen.com/t/programatically-clear-search-in-radzendropdown-and-dropdowndatagrid/4741/2):
>
> Hi Dan, We will add Reset() method similar to RadzenGrid component - it will be added in the next release, it's too late for release today.

---

<div class="post-metadata">

**Author:** ![greenmtvince](https://forum.radzen.com/user_avatar/forum.radzen.com/greenmtvince/32/4944_2.png) [@greenmtvince](https://forum.radzen.com/u/greenmtvince)\
**Post date:** [November 9, 2020, 3:45pm UTC](https://forum.radzen.com/t/programmatically-clear-dropdown-filter/5555/3 "2020-11-09T15:45:02Z")

</div>

Ah perfect! Thanks for the quick reply.

Sorry for the post. I did a search and even had some suggested similar topics pop up before I posted mine, but missed that one.

---

<div class="post-metadata">

**Author:** ![Developer](https://forum.radzen.com/user_avatar/forum.radzen.com/developer/32/6174_2.png) [@Developer](https://forum.radzen.com/u/Developer)\
**Post date:** [March 4, 2021, 1:02pm UTC](https://forum.radzen.com/t/programmatically-clear-dropdown-filter/5555/4 "2021-03-04T13:02:54Z")

</div>

Hi @enchev,

Is this issue fixed?

Thanks.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [March 4, 2021, 1:41pm UTC](https://forum.radzen.com/t/programmatically-clear-dropdown-filter/5555/5 "2021-03-04T13:41:06Z")

</div>

Hey @Developer,

Yes, this method is added. You have full access to the source code to check it.

---

<div class="post-metadata">

**Author:** ![Developer](https://forum.radzen.com/user_avatar/forum.radzen.com/developer/32/6174_2.png) [@Developer](https://forum.radzen.com/u/Developer)\
**Post date:** [March 4, 2021, 1:48pm UTC](https://forum.radzen.com/t/programmatically-clear-dropdown-filter/5555/6 "2021-03-04T13:48:12Z")

</div>

Hey @enchev,

Thanks for rapid reply like Radzen components.

I looked up the source code but I didn't see anything about automatically reset search input. Which class or file do I need to lookup?

Is this _(master/Radzen.Blazor/RadzenDropDown.razor)_ correct location?

Thanks.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [March 4, 2021, 1:52pm UTC](https://forum.radzen.com/t/programmatically-clear-dropdown-filter/5555/7 "2021-03-04T13:52:59Z")

</div>

As I already suggested you, you can add the source code to debug how the component works. In this case you’ve missed the base class of the component:

> <https://github.com/radzenhq/radzen-blazor/blob/master/Radzen.Blazor/DropDownBase.cs#L72>

---

<div class="post-metadata">

**Author:** ![Frank\_mm](https://forum.radzen.com/user_avatar/forum.radzen.com/frank_mm/32/5082_2.png) [@Frank\_mm](https://forum.radzen.com/u/Frank_mm)\
**Post date:** [April 9, 2021, 8:06am UTC](https://forum.radzen.com/t/programmatically-clear-dropdown-filter/5555/8 "2021-04-09T08:06:24Z")

</div>

I also had the same problem, how do I remove the previous lookup value while keeping selected item in case of blank search? reset () will delete the selected value if no results are found in the previous search.
