Rebind Scheduler

16 posts, 1 answers
  1. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 10 May 2011 Link to this post

    Hi All

    Is there a way to rebind the Scheduler Client side?
    I am currently calling the Ajax Manager to rebind this,
    The only problem with that is the Ajax manager rebinds all my Grids at the same time because they are updated controls of the Ajax Manager!

    Many Thanks

    Regards
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 10 May 2011 Link to this post

    Hi Cush,

    You need to add the RadScheduler in the UpdatedControls of the AjaxSettings so that it will be rebound when you perform some action. Please take a look at the AjaxSettings in this demo for an example.

    Please let me know if I got your question.

    Best wishes,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 10 May 2011 Link to this post

    Hi Veronica

    Thanks for you reply,
    I already have this working with the Ajax Manager perfectly,

    I want to rebind the scheduler with Java Client side and not use the Ajax Manager if possible.

    Regards

    Cush
  5. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 10 May 2011 Link to this post

    Hello Cush,

    Unfortunately RadScheduler don't supports client-side rebinding. So the only possible way for now is to use RadAjaxManager.

    Regards,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  6. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 10 May 2011 Link to this post

    Hi Veronica

    Ok thats a shame,
    Thanks very much for your help.

    Regards

    Cush
  7. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 10 May 2011 Link to this post

    Hi Veronica

    How can i work around this problem.

    In My Ajax Manager i have three contols that can be updated by the Ajax Manager:

    1Scheduler
    2 Grid1
    3 Grid2
    3 Grid3

    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="ChildGrid" />
                        <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager2" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager3" />
                        <telerik:AjaxUpdatedControl ControlID="RadToolTipManager4" />
                    </UpdatedControls>
                </telerik:AjaxSetting>

    When i use the Ajax manager to perform a rebind on the Scheduler it also updates Grid1,2 & 3, I need the Ajax Manager to update the 3 grids but not at the time of rebinding the scheduler? I only want the scheduler to update.

    I call the rebind of the scheduler in java client side:
    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebindsched")

    Code Behind
    If e.Argument = "Rebindsched" Then
                RadScheduler1.Rebind()
    end if

    Your Help would be appriciated.

    Regards

    Cush
  8. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 11 May 2011 Link to this post

    Hi Cush,

    I think that your AjaxSettings are not correct. Please note that you need a control that will initialize the postback of other controls on the page. For example in the demo that I showed you in my previous post the RadCalendar1 is the initiator of the rebinding of the RadScheduler as well as RadCalendar2:

    <telerik:RadAjaxManager runat="Server" ID="RadAjaxManager1">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadCalendar1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadCalendar2" />
                            <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
    . . .

    By what action do you want to rebind the RadScheduler? In your case it is rebinded on every postback no matter what is causing this postback.  You need to think of the control that will cause the rebinding of the RadScheduler and put it in  the AjaxSettings in a way similar to the RadCalendar1.

    All the best,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  9. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 12 May 2011 Link to this post

    Hi Veronica

    Thanks for getting back to me,
    Correct me if i am wrong but if i am going to call the Ajax Manager from the Client side to refresh components the Ajax Manager has to be allowed to update these components?
    There fore "I Think" the settings Ajax are as they should be?

    Regards

    Darren
  10. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 13 May 2011 Link to this post

    Hi Cush,

    Yes, you need the AjaxManager to be enabled when you are rebinding controls via ajax callback. However you'll need an invoker for the rebinding of the RadScheduler control. In other cases the control will be rebound on every postback no matter what causes it.

    Regards,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  11. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 17 May 2011 Link to this post

    Hi Veronica

    Sorry for the delayed response!

    I assume when you say Invoker you are suggesting that i use the Ajax manager to call lets say a Hiiden button click event and then use the click event to rebind the scheduler??

    Regards

    Cush
  12. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 20 May 2011 Link to this post

    Hi Cush,

    Please take a look at the attached sample project that I made for you to show you the meaning of invocator and ajaxification.

    There is one RadScheduler on the page and two buttons. The Click of the first button performs an ajax callback and sets the SelectedView of the RadScheduler to "MonthView". You can see an ajax loading animation appearing on the RadScheduler when you click the "Refreshes the RadScheduler" button.

    On the other side there is a simple button with ID="Button2". When you click on this button it just performs a postback on the page without performing any ajaxification.

    Please let me know if you have further questions. I hope that now ajaxification is much more clear.

    Kind regards,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  13. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 20 May 2011 Link to this post

    Good Morning Veronica


    Thank you for taking the time to send me the demo...however
    I dont think i am explaining myself very well at all?

    If i want to make call backs to the server using java functions via the ajax manager the ajax manager has to have the ability to update all of the controls on the page where i might be using java functions to make ajax requests for them?

    i.e

    function f1 (){ 
    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebindsched")
      
    function f2 (){ 
    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindGrid1"
    }

    Therefore the ajax manager need to be able to update the above components

    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
    <UpdatedControls
    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls
    </telerik:AjaxSetting

    But because of this any call made to the ajax manager server side will update all of the controls that the ajax manager has in its updated controls tag?

    I want to be able to call the ajax manager server side via a java function and only update the control in question and not all of the controls in the ajax manager updated controls tag?

    To give you an example i have my scheduler in a sliding pane , when the user opens the pane it scrolls to the current time and rebinds the scheduler via an ajax request to the server side.

    OnClientExpanded

     

     

     

     

     

    ="schedScroll"

     

     

     

     

     

    function schedScroll() { 
      
    try
      
    var $ = $telerik.$; 
      
    var sender = $find("<%= RadScheduler1.ClientID %>"); 
      
    var now = new Date(); 
      
    $(".rsContentTable:visible td", sender.get_element()).each(function (i) { 
      
    var currentTimeSlot = sender.get_activeModel().getTimeSlotFromDomElement($(this).get(0)); 
      
    if (currentTimeSlot.get_startTime().getHours() == now.getHours()) { 
      
    var scrolledIntoViewSlot = $(this).get(0); 
      
    if (scrolledIntoViewSlot) 
      
    scrolledIntoViewSlot.scrollIntoView(); 
      
      
    }); 
      
      
    catch (e) { 
      
    alert(e.Message); 
      
      
    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebindsched"
      

    However the ajax manager also rebinds the grids on my page, i only want the scheduler to rebind?

    So my question was: By invoker do you mean i should be initiating a click event on a hidden button client side to make the server call?
    I was hoping there was another way around this problem.

    Your assistance would be most appriciated on this.

    Best Regards

    Darren

  14. Answer
    Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 26 May 2011 Link to this post

    Hi Cush,

    Thank you for the detailed explanation of the issue as well as the code provided.

    You need to use RadAjax partial ajaxification in your case. Please take a look at the demo here and let me know if you need further assistance.

    Best wishes,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  15. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 26 May 2011 Link to this post

    Hi Veronica

    Thanks very much for getting back to me and for the advise,

    I have tried this solution and it seems to have improved things,
    However should i remove the settings again after every call to the ajax manager?
    Or is this not necessary?

    i.e :
    Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
      
            If e.Argument = "test1" Then
                'Add ajax settings
                RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, RadGrid1, RadAjaxLoadingPanel1)
                RadAjaxManager1.AjaxSettings.AddAjaxSetting(RadAjaxManager1, RadToolTipManager2)
    end if
    'Remove settings
    RadAjaxManager1.Controls.Remove(RadAjaxManager1)
      
    End Sub

    Many Thanks Again

    Best Regards

    Cush
  16. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 26 May 2011 Link to this post

    Hello Cush,

    I'm glad that this was helpful.

    You don't need to remove the AjaxSettings once after you call the AjaxRequest event. You can just extend the check for the e.Argument and test if it is a certain value which controls should be ajaxified.

    All the best,
    Veronica Milcheva
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  17. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 26 May 2011 Link to this post

    Hi Veronica

    Many thanks again, Most helpfull.

    Best Regards

    Cush
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017