Reset Filter

QuestionsReset Filter
Samuel asked 3 months ago

Hi,

 

I’ve seen that there is an option to reset the multi-filters, but I’m trying to do it with a normal filter and I can’t manage to. Could you help me?

 

 

6 Answers
Abu answered 3 months ago

Please explain a bit more what youean by multi-filtet and normal filter. Any screenshot and code will help in understanding.

Samuel answered 3 months ago

Hello

 

here you can see a normal filter and a multi select filter, and the code. It only works with multiselect

 

View post on imgur.com

 

 

Abu Ghufran Staff answered 3 months ago

Hello,

Demo: https://www.gridphp.com/demo/demos/integrations/multiselect-filter.php
Code: https://www.gridphp.com/demo/demos/integrations/multiselect-filter.phps

The button on the button invokes JS code that reset ‘notes’ multiselect filter.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Samuel answered 3 months ago

Hello Abu

 

yes I have this code, but this only resets multiselect filter but not the input filter. I need to restart this filter too.

Abu Ghufran Staff answered 3 months ago

In the callback, use following.

// reset multi-select search field named 'note'
$("#gs_note").multiselect('refresh',true);
// reset single search fields 
jQuery("#list1").trigger("clearToolbar");
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Samuel answered 3 months ago

Yes It works, thank you.

Your Answer

1 + 3 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?