Hello-
I'm working on a page that has a regular calendar control, i bind "selectedDays" to a database and show these days with an offset background color. This tells the user that a record exists on that day. My next step is for the user to then click that date and in a RadDataGrid show all the records for that day.
At this time when i click a highlighted date that i know has a record, it will only show a matching record if it has a Date and Time stamp of 12:00:00 attached to it. However the database has DateTime for when the record was created by the user.
Basically i want the SQL statement triggered by the SelectedDate property of the Calendar control to only send the format Month,Day,Year. I'm not sure how i can control this.
At this time, my code is inline for the clicking of the date to populate the RadGrid. The only codebehind is the code that displays the different background for SelectedDates with a record(s).
I'm working on a page that has a regular calendar control, i bind "selectedDays" to a database and show these days with an offset background color. This tells the user that a record exists on that day. My next step is for the user to then click that date and in a RadDataGrid show all the records for that day.
At this time when i click a highlighted date that i know has a record, it will only show a matching record if it has a Date and Time stamp of 12:00:00 attached to it. However the database has DateTime for when the record was created by the user.
Basically i want the SQL statement triggered by the SelectedDate property of the Calendar control to only send the format Month,Day,Year. I'm not sure how i can control this.
At this time, my code is inline for the clicking of the date to populate the RadGrid. The only codebehind is the code that displays the different background for SelectedDates with a record(s).
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:LionsConnectionString %>" |
SelectCommand="SELECT ArticleID, ArticleTitle, ArticleSubject, ArticleContent, ArticleDateTime, ArticleExp, ArticleExpChkBox, UserID, UserName FROM tblLionsArticles WHERE ((ArticleDateTime) = @ArticleDateTime)"> |
<SelectParameters> |
<asp:ControlParameter ControlID="RadDatePicker1" DefaultValue="1/1/2008" Name="ArticleDateTime" |
PropertyName="SelectedDate" /> |
</SelectParameters> |
</asp:SqlDataSource> |
<div id="output" class="module" style="overflow: auto; float: right; width: 256px; |
height: 240px; margin-right: 0px; color: #ff0000; padding: 5px 5px 5px 5px;"> |
</div> |
<div style="padding-left: 5px"> |
<telerik:RadCalendar ID="RadCalendar1" runat="server" Font-Names="Arial,Verdana,Tahoma" |
ForeColor="Black" Style="border-color: #ececec" EnableMultiSelect="False" Skin="Black" |
ViewSelectorText="x" OnDayRender="RadCalendar1_DayRender" AutoPostBack="True" |
EnableViewSelector="true" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" |
ShowOtherMonthsDays="False"> |
<ClientEvents OnDateClick="Calendar_OnDateClick2" /> |
<SpecialDays> |
<telerik:RadCalendarDay IsSelected="true" Repeatable="Today" Date="" ItemStyle-CssClass="rcToday"> |
<ItemStyle CssClass="rcToday"></ItemStyle> |
</telerik:RadCalendarDay> |
</SpecialDays> |
</telerik:RadCalendar> |
Thank you!