Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

paging grids with filters dont work

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone!

I'm newie in GXT, here is my problem: I am trying to implement a paging grid that also use filters.
Here is the code:



where "TestData.getCompanies()" gets the data displayed in the grid, and "cm" is the ColumnModel with the configuration for the columns. That is working fine. My problem is that I have a combo to filter the grid. After select a value in the combo, I want to reload the whole grid, and shows only the results filtered. But I want to filter the whole set of data, and not only the data which is in the current page you are looking at. I don't know if I am explaining my situation well... But I would like to update also the number of pages showed.

For example, I have 3000 companies, 1500 of them are from "Italy" and the others 1500 are from "Poland". My grid shows a total of 300 pages. If I am watching one of the pages that only shows companies from "Poland" and I filter "Italy", that page of the grid is empty of data, and the count of pages is still 300 when it would have to reload and only shows 150 pages with the companies that are from "Italy".

I would be very grateful if somebody has any idea.

I suppose I need to extend "PagingModelMemoryProxy" to support filtering (by overriding the load method), but I don't know how to do it.
Is this what I have to do ?

Any idea is welcome,

Thanks in advance !!!




  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!