New Posts New Posts RSS Feed: Filtering data on the client
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Filtering data on the client

 Post Reply Post Reply
Author
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Topic: Filtering data on the client
    Posted: 02-Feb-2011 at 5:11pm
I have a form that displays payments by members. These payments can be dues, initiation, or PAC. When the form displays, I retrieve all the payment records and populate an observablecollection which populates a grid displaying the payments. On the form is a checkbox whether the user wants to see the PAC payments along with the dues and initiation. By default, the check box is turned off meaning they only want to see dues and initiation. if they click the checkbox, then they want to see all 3. I don't want to make 2 trips to the server for the data. I want to retrieve all the payments for a member the first time and only display certain payments depending on the checkbox.
 
What is the best way to handle this?
 
Bill
 
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 02-Feb-2011 at 5:33pm
Bill,
 
When the form displays, issue a query for all payments. Then issue a second query (within the first's callback) using CacheOnly strategy and populate the ObservableCollection/grid. Toggling the checkbox would also query the cache.
 
I hope it helps.
   Silvio.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down