EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: A-K on September 10, 2015, 03:23:23 AM



Title: Problem with filter extension
Post by: A-K on September 10, 2015, 03:23:23 AM
Hey,

I am using the loader function to insert data to the datagrid,
In the loader function I am checking if the data exist if not I will get it from the server otherwise I will insert the existing one.

The problem with the filter is that when re-creating the table and the loader function is called,if the data is not coming from the server, which means that I am loading the existing data then the filters do not work with the last filter input, they will show all the data in the datagrid. but when using the server everything works fine.

Here is an example:
Data coming from server: http://jsfiddle.net/3L4ej4dx/119/ (http://jsfiddle.net/3L4ej4dx/119/) filters works great!

Data coming from client: http://jsfiddle.net/3L4ej4dx/120/ (http://jsfiddle.net/3L4ej4dx/120/) Filters do not work!

Any fix?

Thanks.


Title: Re: Problem with filter extension
Post by: stworthy on September 10, 2015, 08:12:06 AM
Please try this http://jsfiddle.net/3L4ej4dx/121/


Title: Re: Problem with filter extension
Post by: A-K on September 10, 2015, 08:16:02 AM
Thanks but I know that with doFilter it works,

The problem is, why when the data is from the server I do not need to use doFilter and when its not from the server I do?

Why its not working the same way no matter where the data comes from? I have wrapped an EasyUI table that my team works with and I do not know when they use data from the server or from the client, and I do not want to use doFilter all the time even when the data is from the server...

Can it work the same way all the time?


Title: Re: Problem with filter extension
Post by: stworthy on September 10, 2015, 08:32:08 AM
Please try this example http://jsfiddle.net/3L4ej4dx/122/. It works like what you expect.


Title: Re: Problem with filter extension
Post by: A-K on September 10, 2015, 08:34:17 AM
Thanks!