Unplanned
Last Updated: 11 Nov 2020 05:38 by ADMIN
Irene
Created on: 11 Nov 2020 05:37
Category: Grid
Type: Feature Request
8
Ability to clear the SearchBox on Escape key, with an "X" in the input and Programmatically

I have a reset all button that clears a grid of all column, filter, sorts etc.

I need it to also reset any searchbox criteria.  I can easily clear the searchbox of it's value using javascript, but this does not then trigger the searchbox to reset the grid.

---

ADMIN EDIT

A workaround could be to clear the input with a bit of JS and to trigger its input event so it bubbles up to the Blazor code. Something like:

// locate the searchbox of the Grid
const input = document.querySelector(".k-grid-search input"); 
// clear the value of the input
input.value = ""; 
// dispatch the input event in order to force the Grid event binding to trigger the filtering
input.dispatchEvent(new Event('input', {bubbles: true} ));

---

0 comments