RadScheduler External Edit in RadDock Order of Events

4 posts, 1 answers
  1. Gareth
    Gareth avatar
    2 posts
    Member since:
    Sep 2012

    Posted 19 Apr 2013 Link to this post

    I'm using External Edit in RadDock BUT I'm using EntityDataSources rather than SessionDataSources. On editing an appointment with my custom form (in the RadDock) the database is correctly updated but the RadScheduler is redrawn before the data update so it appears not to update on the page.
    • I've checked with Firebug and it definitely does make the ajax call and redraw with the pre-edit data, thus the problem is not that the AjaxManager fails to call (which was my first thought).
    • If I click on the today link (or in any way cause the RadScheduler to redraw again) all is well, the data is correctly displayed.
    • Immediately after editing the appointment the context menu (on the edited appointment only) fails, i.e. no longer comes up with the custom (EDIT and DELETE) but right click shows the browser's context menu. (Hovering on the appointment at this point gives a javascript error that l is null in this)
    • Drag and drop works
    • Delete works
    • Completely removing the RadAjaxManager (so the whole page reloads) does not change the behavior, still getting the pre-edit data back and the context menu problem.

    Any Ideas?

  2. Answer
    Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2062 posts

    Posted 24 Apr 2013 Link to this post

    Hello,

    Thank you for contacting Telerik Support.

    Your observations are absolutely correct and you can avoid that unusual behavior simply by rebinding the RadScheduler control after you have finished updating specific appointment. Please add the following line of code at the bottom of the SubmitButton_Click event handler in the code behind:
    //code behind
    protected void SubmitButton_Click(object sender, EventArgs e)
        {
           ......
     
            RadDock1.Closed = true;
            RadScheduler1.Rebind();
        }

    Hope that this will be helpful.

    Regards,
    Boyan Dimitrov
    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.
  3. Gareth
    Gareth avatar
    2 posts
    Member since:
    Sep 2012

    Posted 24 Apr 2013 Link to this post

    Thanks Boyan,

    I have recoded the offending scheduler to use SqlDataSources but I will revert to the EntityDataSource now. For future reference, does this apply only to EntityDataSource or are there others for which Rebind() is also required?

    Gareth.
  4. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2062 posts

    Posted 29 Apr 2013 Link to this post

    Hello Gareth,

    Thank you for getting back to us.

    It seems that using the RadScheduler Rebind method is required only when using the EntityDataSource.

    Thank you for understanding.

    Kind regards,
    Boyan Dimitrov
    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.
Back to Top