2010-10-27

DateTime filter in SharePoint 2010 List View

The way i got around this, was to pipe the result from the DateTimeControl to a HiddenField using inline code.

Added these controls
< SharePoint:DateTimeControl runat="server" id="FilterFrom" DateOnly="True" LocaleId="3081" SelectedDate="2010-10-01"/>
< asp:HiddenField runat="server" id="FilterFromFixed" />

Had this query
< Where>
< Geq>
< FieldRef Name="FirstDay"/>
< Value Type="DateTime">{FilterFromFixed}< /Value>
< /Geq>
< /Where>

Added this to web.config
< PageParserPath VirtualPath="/Lists/YourList/YourView.aspx" CompilationMode="Always" AllowServerSideScript="true" />

Then had this inline code in the view
< script runat="server">
protected void Page_Load(object sender, EventArgs e) {
FilterFromFixed.Value = FilterFrom.SelectedDate.ToString("yyyy-MM-dd");
}
< /script>

12 comments:

Anonymous said...

When I initially commented I clicked the "Notify me when new comments are added" checkbox
and now each time a comment is added I get four emails
with the same comment. Is there any way you can remove me from that service?
Thanks a lot!

Feel free to surf to my page - diets that work fast

Anonymous said...

I'm really enjoying the design and layout of your site. It's
a very easy on the eyes which makes it much more enjoyable for me to come here and visit
more often. Did you hire out a developer to create your theme?
Outstanding work!

my homepage google [google.com]

Anonymous said...

Genuinely no matter if someone doesn't understand afterward its up to other viewers that
they will help, so here it happens.

Here is my blog: arizona lawyers

Anonymous said...

I savor, result in I discovered just what I was taking
a look for. You've ended my 4 day lengthy hunt! God Bless you man.
Have a nice day. Bye

Also visit my page ... garcinia cambogia side effects

Anonymous said...

Oh my goodness! Incredible article dude! Thanks, However I am encountering problems with your
RSS. I don't know the reason why I cannot join it. Is there anybody having the same RSS
issues? Anyone who knows the solution can you kindly respond?
Thanx!!

Here is my weblog; Jual Jersey Bola Original

Anonymous said...

Now here's my question, could it be just me or do many with the video
gaming reviews on every gaming site seem. If you can find a means to decompress and please your companion,
than there-should-be less conflict. The noise canceling microphone also served us well, and
yes it conveniently folds up and out with the way if
not in use. Apad only has similar appearance when i - Pad
and next to nothing else in common, for example, their OS is Android plus they are heavier.
Be conscious of some websites are unsafe as a result
of malware, Trojans and spyware. This is a marvellous computer for residence use as well as for students.
It might take a number of games to have your face across the many
rules and actions available. It installs easily for
the genius architecture while it is additionally offers
a thrilling game. Astro Avenger could be a fantastic game for a professional as if you to wind down from a day inside the office and fantasizing
to be seeking an Evil emperor containing overthrown the rightful rulers from the empire
this agreement you belong. Keep at heart that everybody might not want to become listed on in every game
so have a good enough selection to peak everyone's interest.
In my experience, there's no other way to learn in relation to a sport then by
somebody who loves to try out it inside their free time all day.
Models are blocky, textures are sometimes low-res, along with
the effects to make an effort to hide the rough edges don. Healing abilities from the character may help him plan the following level.
It is bonus rounds such as this that will make UK style
fruit machines so entertaining to try out, and keep people finding its way back over and over
again again. If you happen to be searching for websites or sources on how you can download free games for that PSP, you'll not have
to search any further. Enter System Restore inside your Start
menu search, and select. When you acquire used games, you can obtain as too much as
half off some video gaming. You would enjoy fantastic ease when you
apply the Apad to surf on the internet, watch videos,
pay attention to music, play games, communicate on social media, chat online and also send and receive e-mail.
One from the negatives with this game is often a very long building time.
Before I reach serious regarding the process, it is time to mention that it has been noted through the satirical comedians,
Idiots of Ants. This website keeps checking every
film and makes sure that people are enjoying films in a safer way.
The naval and pirate theme is lighthearted and fun, and is a welcome change of pace after the darker subterfuge themes in Intrigue.
Military actions enable you to draw and play military cards such as wars, pacts,
territories and events, and also hire armies. Continue to bolster your economy,
and eventually create a victory through overrunning your opponent.
Cloaking makes your links look really good and professional in comparison to using raw affiliate links simply because they tend not to look good to the eyes of an potential buyer.


Here is my web site angry birds transformers hack

Anonymous said...

Hello to every one, because I am truly eager of reading this webpage's post to be updated regularly.
It contains nice stuff.

Feel free to visit my page :: over here

Anonymous said...

For newest news you have to pay a visit internet and on world-wide-web I found
this website as a finest website for newest updates.

My web-site :: west Palm beach Moving companies

Anonymous said...

Internet has been attracting criminal case cheat people. Many portals offers a great variety of mobile gaming community.

So above are just as good weather, predator,
split up into the phone while others are more popular in the prestigious
museums wherever they are even offering free mobile games.
I remember playing snake on criminal case cheat your desktop.



Feel free to surf to my web site; criminal case cheats

Anonymous said...

Hey There. I found your blog using msn. This is an extremely
well written article. I will make sure to bookmark it and
come back to read more of your useful info. Thanks for the post.
I will certainly return.

Stop by my weblog realtors.webuyhousesphoenix.net; ,

Anonymous said...

e cigarette, e cigarette, electronic cigarette brands, e cigarette health, buy electronic cigarette, smokeless cigarettes

Anonymous said...

electronic cigarette brands, best electronic cigarette, ecig, electronic cigarettes, smokeless cigarettes, smokeless cigarettes