Dave Whiting
Top achievements
Rank 1
Dave Whiting
asked on 28 Jul 2008, 01:51 PM
Hi,
I'm using the DayRender event to set styles for holidays and weekends on a radDatePicker containing a calendar with autopostback = true. I've then used AjaxManager to cause the DayRender to fire when the fast-navigation 'next month' button is clicked on the calendar.
The problem I get is that the Ajax postback appear to fire but the calendar control (month view) disappears and the user has to click the calendar button on the datepicker again to bring it back. It does however display the next month which is what i needed. I need to stop the calendar hiding itself.
Any idea how I could fix or work around this?
Many Thanks
Mark
I'm using the DayRender event to set styles for holidays and weekends on a radDatePicker containing a calendar with autopostback = true. I've then used AjaxManager to cause the DayRender to fire when the fast-navigation 'next month' button is clicked on the calendar.
The problem I get is that the Ajax postback appear to fire but the calendar control (month view) disappears and the user has to click the calendar button on the datepicker again to bring it back. It does however display the next month which is what i needed. I need to stop the calendar hiding itself.
Any idea how I could fix or work around this?
Many Thanks
Mark
7 Answers, 1 is accepted
0
Dave Whiting
Top achievements
Rank 1
answered on 30 Jul 2008, 01:24 PM
bump...
Has anyone any idea how i may fix this please?
Thanks
Mark
Has anyone any idea how i may fix this please?
Thanks
Mark
0
Hi Mark Broomfield,
A scenario where the calendar of the date picker has AutoPostBack set to true is not supported by RadDatePicker.
In order to implement the desired functionality, you could use the DayRender sever event of the calendar to customize the default calendar view. And implement the OnDayRender client-side event to customize the month view after navigation.
Find more about DayRender event in the following online resources:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Calendar/Examples/Programming/CustomDayCellRendering/DefaultCS.aspx
http://www.telerik.com/help/aspnet-ajax/calendar_serversidedayrender.html
http://www.telerik.com/help/aspnet-ajax/calendar_clientsideondayrender.html
Let us know if you need further assistance.
Regards,
Iana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
A scenario where the calendar of the date picker has AutoPostBack set to true is not supported by RadDatePicker.
In order to implement the desired functionality, you could use the DayRender sever event of the calendar to customize the default calendar view. And implement the OnDayRender client-side event to customize the month view after navigation.
Find more about DayRender event in the following online resources:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Calendar/Examples/Programming/CustomDayCellRendering/DefaultCS.aspx
http://www.telerik.com/help/aspnet-ajax/calendar_serversidedayrender.html
http://www.telerik.com/help/aspnet-ajax/calendar_clientsideondayrender.html
Let us know if you need further assistance.
Regards,
Iana
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Peter
Top achievements
Rank 1
answered on 07 Feb 2013, 05:11 AM
My DayRender event doesn't fire when I navigate to another month... what's the fix?
0
Hi Peter,
Could you please elaborate more on which DayRender event does not fire the server-side or client-side? The server-side will be triggered if the AutoPostBack property of the calendar is set to true. As for the client-side in order to initially invoke the event you can do something like this:
ASPX:
JavaScript:
All the best,
Angel Petrov
the Telerik team
Could you please elaborate more on which DayRender event does not fire the server-side or client-side? The server-side will be triggered if the AutoPostBack property of the calendar is set to true. As for the client-side in order to initially invoke the event you can do something like this:
ASPX:
<
telerik:RadDatePicker
runat
=
"server"
ID
=
"DatePicker1"
>
<
Calendar
runat
=
"server"
>
<
ClientEvents
OnLoad
=
"Load"
OnDayRender
=
"RenderADay"
/>
</
Calendar
>
</
telerik:RadDatePicker
>
JavaScript:
function
RenderADay(sender, eventArgs)
{
//your logic
}
function
Load(sender,eventArgs)
{
sender._moveToDate(sender.get_focusedDate(),
true
);
}
All the best,
Angel Petrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Peter
Top achievements
Rank 1
answered on 12 Feb 2013, 12:13 AM
When I put AutoPostBack on the Date Picker's Calendar, the calendar pop-up displays when I click on it, but then the page posts-back and the pop-up closes. I've tried with both a RadAjaxManager and a RadAjaxPanel.
0
Hi Peter,
When setting AutoPostBack the behavior that you experiencing is expected as Iana explained in her post. I suggest that you use the client-side OnDayRender event instead of the server-side as it fits your requirements better.
Kind regards,
Angel Petrov
the Telerik team
When setting AutoPostBack the behavior that you experiencing is expected as Iana explained in her post. I suggest that you use the client-side OnDayRender event instead of the server-side as it fits your requirements better.
Kind regards,
Angel Petrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0