how to force ondayrender?

7 posts, 1 answers
  1. Ron Cirka
    Ron Cirka avatar
    19 posts
    Member since:
    Jul 2009

    Posted 21 Sep 2009 Link to this post

    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
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Sep 2009 Link to this post

    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.
  3. Ron Cirka
    Ron Cirka avatar
    19 posts
    Member since:
    Jul 2009

    Posted 22 Sep 2009 Link to this post

    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.
  4. Pierre
    Pierre avatar
    138 posts
    Member since:
    Feb 2006

    Posted 15 Jun 2010 Link to this post

    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 
    //
    }
  5. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 22 Jun 2010 Link to this post

    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
  6. Pierre
    Pierre avatar
    138 posts
    Member since:
    Feb 2006

    Posted 22 Jun 2010 Link to this post

    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.
  7. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 25 Jun 2010 Link to this post

    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
Back to Top