This is a migrated thread and some comments may be shown as answers.

How to do a custom date range sort

1 Answer 25 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Boulevard
Top achievements
Rank 2
Boulevard asked on 27 Mar 2014, 09:41 AM
I have a module called Employees that is for a company directory. There's a field in that module that has the BIRTH DATE.  What do I need to do to get the employees to show in a date range? For example, I want to show who's celebrating a birthday in the next three weeks. I'd like to display their pic, name and birthday (e.g. Pic, Bob Smith, June 22nd).

1 Answer, 1 is accepted

Sort by
0
Sabrie Nedzhip
Telerik team
answered on 07 Apr 2014, 04:18 PM
Hi Bryan,

You can create a user control (.ascx file) and query in the code behind the employees who have birthday in the next three weeks. You can find samples on how to retrieve employees through filtering and how to work with your dynamic module programatically in the code reference which is automatically generated for your custom module created using the Module Builder. To view the generated code samples please go to Administration -> Module builder and select your moduleThen please click on the Code reference for < module name> link which is on the right-hand side of the page. Here is a screenshot for your convenience.

After you get the employees filtered by their birth date in the code behind, you can bind them to a ListView or any other control in order to display the desired information about the employees on the frontend.

After performing the above, you can register the user control using Sitefinity Thunder as described in the following documentation article and add the widget on your page.

Regards,
Sabrie Nedzhip
Telerik
 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 
Tags
General Discussions
Asked by
Boulevard
Top achievements
Rank 2
Answers by
Sabrie Nedzhip
Telerik team
Share this question
or