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

how to force ondayrender?

6 Answers 251 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Ron Cirka
Top achievements
Rank 1
Ron Cirka asked on 21 Sep 2009, 05:49 PM
I am using a radcalender. When I click a button, I would like it (via server-side) to refresh and go through the OnDayRender sequence again. How can I do this?

Ron

6 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 22 Sep 2009, 06:29 AM
Hello Ron,

I am not quite sure about your scenario. I tried the scenario and found that the DayRender event fires on every postback (I tried Button click).
Have you tried ' RadCalendar1.DataBind(); ', if you are using any Ajax calls?

-Shinu.
0
Ron Cirka
Top achievements
Rank 1
answered on 22 Sep 2009, 01:22 PM
My bad, you are right, I am using a radajaxmanager and didn't have the button associated with the calendar. I added it and it fixed the problem. Thanks for your help.
0
Pierre
Top achievements
Rank 1
answered on 15 Jun 2010, 10:35 PM
Hi,

I have same problem client side. I use OnCalendarViewChanging to load my webservice with month content and OnDayRender="onDateRender" to render but my reponse digest from viewchanging is always later in the cycle (time elapsed). I need to perform one second OnDayRender after success of OnCalendarViewChanging. Some way to perform client side?.

function OnCalendarViewChanging(sender,args)
{
   mywebservice (OnSuccess)
}
function OnSuccess()
{
   new complete render cycle;  <---
}
function OnDayRender(sender, args)
{
  digest reponse 
//
}
0
Daniel
Telerik team
answered on 22 Jun 2010, 11:53 AM
Hello Pierre,

It is not possible to force the client-side DayRender event out-of-the-box, however you can use this workaround:
sender._moveToDate(sender.get_focusedDate(), true);

Regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Pierre
Top achievements
Rank 1
answered on 22 Jun 2010, 02:16 PM
Hi Daniel,

It's not only one date. I have created a webservices to load all my prices and services day based, i need to Dayrender one new time all items not focus only one. i searched inside telerik code one function to activate new render but not found. I need one realy solution or stoping with calendar this dev. Add a "repaint" or OnSuccess for your events to bee able to joint services.

Best regards.
0
Daniel
Telerik team
answered on 25 Jun 2010, 11:23 AM
Hello Pierre,

Have you tried my suggestion?
Please copy the following code as is and let me know whether it works as expected:
<script type="text/javascript">
    function dayRender(sender, args)
    {
        document.title += "."; //for testing purposes
    }
 
    function forceDayRender()
    {
        var calendar = $find('<%= RadCalendar1.ClientID %>');
        calendar._moveToDate(calendar.get_focusedDate(), true); //force dayrender
    }
</script>
<input type="button" onclick="forceDayRender()" value="DayRender" />
<telerik:RadCalendar ID="RadCalendar1" runat="server">
    <ClientEvents OnDayRender="dayRender" />
</telerik:RadCalendar>

Regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Calendar
Asked by
Ron Cirka
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Ron Cirka
Top achievements
Rank 1
Pierre
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or