Author Topic: about a column filter function  (Read 2042 times)

Akihiro Inoue

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 32
    • View Profile
about a column filter function
« on: April 06, 2018, 03:45:54 pm »
Hi,support.

Please teach it about a column filter function
step1. Perform search in server and display search result in grid
step2. Filter using column filter in the grid.
step3. Server side process tobe done again (data update)
step4. Display the result in the grid again

In step4, it is required to use the filter set in step2.
(currently the filter is not used and all data is displayed)

Is it possible to filter this way in the PQgrid?
how to perform this filter while reloading data when filter is set already.



paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: about a column filter function
« Reply #1 on: April 09, 2018, 09:06:11 am »
Please refer to these resources:

https://paramquery.com/tutorial/editing

https://paramquery.com/pro/tutorial#topic-remote-requests

https://paramquery.com/pro/demos/editing_batch

https://paramquery.com/pro/demos/filter_header

There is no need for step4 as remote server data updates work independently and don't upset the filters. Grid sends only the modified records to the server and expects the same response from server filled with primary key values as shown in all the examples of batch editing/ auto updates and row editing. ( Request and response don't contain the entire data of grid ).

In any case if there is need to refresh entire data in grid ( without losing filtering ), use refreshDataAndView method which resends filter params to the server and displays filtered results in the grid.
« Last Edit: April 09, 2018, 09:22:23 am by paramquery »

mercury85

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 58
  • ASP.NET, VB.NET, MVC, JS, C#, VBA, SQL, MDX, DAX
    • View Profile
Re: about a column filter function
« Reply #2 on: April 26, 2018, 09:39:56 am »
I think there are some big variables here.  Step 1 will really depend on how you are interacting with your service either using REST services, MVC, or a View Model approach.  Step 2 is not to bad, a lot of the demos have some nice examples, nice thing also is most of the time filters are needed on your groupings, so you can iterate thru your groupModel to assist.

3 and 4 really depend how you want to maintain your view/model state.  I handle this thru my controllers depending what the users are doing, no need for so many refreshes when a model configuration maintains your view state.