Last Updated: 16 Nov 2021 14:38 by ADMIN
Release 2.30.0
Created on: 11 Nov 2020 05:37
Category: Grid
Type: Feature Request
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.



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} ));


Posted on: 04 Aug 2021 01:20
Please add the ability to programmatically reference, read and write the search box text.
Posted on: 23 Apr 2021 09:10
Thanks for your help. It worked.