Print Page | Close Window

Filtering data on the client

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2483
Printed Date: 08-Jul-2026 at 7:30pm


Topic: Filtering data on the client
Posted By: BillG
Subject: Filtering data on the client
Date 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
 



Replies:
Posted By: sbelini
Date 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.



Print Page | Close Window