External Edit in RadWindow

10 posts, 0 answers
  1. Yamil
    Yamil avatar
    57 posts
    Member since:
    Jun 2012

    Posted 06 May 2008 Link to this post

    I am looking the "External Edit in RadWindow" sample and I think there is some code missing. Where do i can find the whole package ?
  2. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 08 May 2008 Link to this post


    You can find all files for the examples in your local installation of Telerik.Web.UI  at: 

    Live Demos\Scheduler\Examples\



    Peter
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Yamil
    Yamil avatar
    57 posts
    Member since:
    Jun 2012

    Posted 08 May 2008 Link to this post

    Yes, I saw it after I sent my request...
    I advice myself "Read the docs...!"

    However i am studying the code and i do not understand why the RadScheduler is defined too in the AdvancedFormVB.aspx. I only need a dialogo to edit and then update the Radscheduler inside the parent web form...
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 08 May 2008 Link to this post

    Hi Yamil,

    The AdvancedFormVB.aspx is used to be displayed in the window. The way the example is created, this should not pose any undesired side effects, since the two instances of RadScheduler are synchronized and update the same datasource. If you have any concerns, please specify them and we will try to address them. 
     

    Greetings,
    Peter
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Yamil
    Yamil avatar
    57 posts
    Member since:
    Jun 2012

    Posted 08 May 2008 Link to this post

    Thanks Peter. What I want is just only use the RadWindow as a editor and then pass the values to the parent form, save them and update the scheduler
  7. David Penny
    David Penny avatar
    174 posts
    Member since:
    Jun 2006

    Posted 23 Jul 2008 Link to this post

    Hi,

    Just wondering if there is any progress on this thread?

    I am trying to do exactly the same thing - open a RadWindow, edit the selected Event, Save it and refresh the calling RadScheduler, without putting a copy of RadScheduler on my RadWindow.

    I seem to have worked out almost all of the steps required, but when closing my RadWindow and refreshScheduler() gets called the example code keeps returning null for the Scheduler (I assume because I am not using a copy on the RadWindow).

    Is there an allernative Javascript for refreshing the RadScheduler on the calling page when RadWindow is closed?

    David Penny
  8. T. Tsonev
    Admin
    T. Tsonev avatar
    2770 posts

    Posted 23 Jul 2008 Link to this post

    Hello David,

    We have recently reworked the example with the external edit form to use RadDock instead of RadWindow. This has greatly simplified it and has eliminated the need for a second instance of RadScheduler. The example is available in the Futures release and will be included in the upcoming Q2 release, which should be available very soon.

    The example is located here:
    http://www.telerik.com/DEMOS/ASPNET/Prometheus-futures/Scheduler/Examples/RadDock/DefaultCS.aspx

    Sorry for the inconvenience.

    Greetings,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. David Penny
    David Penny avatar
    174 posts
    Member since:
    Jun 2006

    Posted 23 Jul 2008 Link to this post

    Thanks for the reply.

    I have actually worked out an alternative anyway.

    My RadWindow does not have a RadScheduler on it, and when I return back to the calling page I just use the following:

    function refreshScheduler()  
                {  
                    document.forms[0].submit();  
                } 

    Not very elegant or efficient, but it's simple and seems to work fine for me at the moment.

    David Penny
  10. Avinash
    Avinash avatar
    6 posts
    Member since:
    Mar 2009

    Posted 16 Mar 2009 Link to this post

    Hi David ,
    I am also doing the same. I was struck at this point. Refreshing the parent page after editing the appointment. May i know how u save the data and close the radWindow and call this function?

    Thanks in Advance.
  11. David Penny
    David Penny avatar
    174 posts
    Member since:
    Jun 2006

    Posted 16 Mar 2009 Link to this post

    Avinash,

    I have rewritten most of this since the first post.  What I now do is:

    In Javascript call the RadWindow, do my editing, and then in the Save button the following is called:

    function CloseAndRebind() {  
                    GetRadWindow().Close();  
                    GetRadWindow().BrowserWindow.refreshGrid(null);  
                } 
    Although this says BrowserWindow.refreshGrid it's because I was too lazy to change it.  This can be BrowserWindow.refreshAnythingYouLike - as long as that is defined in your calling page.
     
    I just call this from server code with:

    ScriptPlaceholder.Text = "CloseAndRebind();" 

    Where scriptholde is defined as:

    <script type="text/javascript">  
                <asp:Literal ID="ScriptPlaceholder" runat="server"></asp:Literal> 
        </script> 
     

    When the calling page is returned to (although it's not exactly like that) the refreshGrid is called and you put in whatever code you want there.

     function refreshGrid() {  
                    startTimer();  
                    var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");  
                    ajaxManager.ajaxRequest('RebindScheduler');  
                } 

    RebindScheduler is sever side code:

        Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest  
            Dim cmd As String = e.Argument.ToString  
            If cmd = "RebindScheduler" Then  
                DisplayScheduler(txtStaff.Text)  
            End If  
        End Sub  
     

    Couple of gotchas that stopped my screen refreshing, in the early days, and also now.  Make sure that RadAjax is defined as refreshing your Scheduler, otherwise changes will not appear or the above code not get called either.  I also have the Scheduler refreshing itself (for drag and drop) and also any updated controls as well.

    This is all taken from the code example published on this site for editing Scheduer information using RadWindow.  Not sure if this is still available though as the current recomendation seems to be to use a different method, but I like using a window, and so do my Customers.

    Hope this helps a bit, but if you need clarification let me know.

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