Grid filters reset


#1

I am trying to manually reset filters in a grid. This will triggered on a tree checkbox call. I had working at one point but got ahead of myself and didn’t save a copy and I’m using Noteapad …so basically have no history to fall back on…and I must have inadvertently removed code that allowed it to work.

In version 5 I used a loop to iterate through the header values and set each to empty strings…I imagine I can do the same with 7 (would be a nice feature/method - clearFilters()) once I understand why the following does not work…

I am used to working with version 5 and I’m finding this version to be a learning curve so any help is greatly appreciated:

computer = computer_grid.getHeaderFilter("computer").querySelector("input"); // html element - grid filter - inputbox - computer
model = computer_grid.getHeaderFilter("model").querySelector("select");      // html element - grid filter - selectbox - model 

 computer_value = computer.value; // inputbox value - confirmed value
 model_value = model.value;   // selectbox value - confirmed value

 // does not work when trying to clear filters
 computer.value = ""; 
 model.value = "";

//Had working in a one-liner...but using Notepad and must have inadvertently removed code to get it to work again
computer_grid.getHeaderFilter("computer").querySelector("input").value = "";
computer_grid.getHeaderFilter("model").querySelector("select").value = "";

#2

Hello.
Please, refer tio the following solution:
https://snippet.dhtmlx.com/mj81jxxm