Skip to main content
Home Forums Silverlight Programming WCF RIA Services Creating the Filter Descripter for From and To date
2 replies. Latest Post by dhiraj.ranka on November 4, 2009.
(0)
dhiraj.r...
Member
44 points
14 Posts
08-31-2009 8:28 AM |
Hi All,
I have just created a sample application in silverlight using RIA Services,
Now I want to create a new filter descriptor which will take From date and To date from DatePicker and all the data will be loaded between this date.
I was able to create a filter descriptor using a date difference, like data for last month.
Thanks in advanced,
Jonathan...
All-Star
24992 points
2,435 Posts
09-04-2009 7:16 AM |
Hi Dhiraj.ranka,
It shall similar with the below.
<riaControls:DomainDataSource x:Name="source" QueryName="GetEmployeesByGender" AutoLoad="True"> <riaControls:DomainDataSource.DomainContext> <domain:AdventureWorksDomainContext /> </riaControls:DomainDataSource.DomainContext> <riaControls:DomainDataSource.QueryParameters> <riaData:ControlParameter ParameterName="startDate" ControlName="myStartDatePicker" PropertyName="SelectedDate" RefreshEventName="SelectedDateChanged" /> <riaData:ControlParameter ParameterName="endDate" ControlName="myEndDatePicker" PropertyName="SelectedDate" RefreshEventName="SelectedDateChanged" /> </riaControls:DomainDataSource.QueryParameters> </riaControls:DomainDataSource>
Best regards,
Jonathan
11-04-2009 4:59 AM |
Thanks Jonathan,
I understood this point but now the point is that I have already added a FilterDecriptor on Domain Data Source, so can I use control parameter and filter descriptor together?
If yes then how the IEnumerable method will look like with ControlParameter (for example, GetEmployeesByGender() which is used as QueryName).
Is it parameter name is the name of the database field or something else?
See I know its confusing but I have asked what ever came to my mind
I hope you understand this ;-)