Skip to main content

Microsoft Silverlight

Answered Question Creating the Filter Descripter for From and To dateRSS Feed

(0)

dhiraj.ranka
dhiraj.r...

Member

Member

44 points

14 Posts

Creating the Filter Descripter for From and To date

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,

Thanks & Regards,
Dhiraj Ranka

Dhiraj's Blog | Follow me here

Jonathan Shen – MSFT
Jonathan...

All-Star

All-Star

24992 points

2,435 Posts

Microsoft
Answered Question

Re: Creating the Filter Descripter for From and To date

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 

 

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

dhiraj.ranka
dhiraj.r...

Member

Member

44 points

14 Posts

Re: Creating the Filter Descripter for From and To date

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 ;-)

Thanks & Regards,
Dhiraj Ranka

Dhiraj's Blog | Follow me here
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities