AdvancedForm Modal AdvancedEditTemplate

13 posts, 1 answers
  1. Bob Everland
    Bob Everland avatar
    9 posts
    Member since:
    Mar 2009

    Posted 11 Aug 2009 Link to this post

    I can not get an AdvancedEditTemplate to open when modal="true" is set. Is there a limitation with this?
  2. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 11 Aug 2009 Link to this post

    Hello Bob,

    That's a very good question. We will create a help topic to address this case, but meanwhile, please try the following:

     <AdvancedEditTemplate> 
                <div class="rsAdvancedEdit" style="position: relative">  
                    <%-- Title bar. --%> 
                    <div class="rsAdvTitle">  
                        <%-- The rsAdvInnerTitle element is used as a drag handle when the form is modal. --%> 
                        <h1 class="rsAdvInnerTitle">  
                            Title</h1> 
                        <asp:LinkButton runat="server" ID="AdvancedEditCloseButton" CssClass="rsAdvEditClose" 
                            CommandName="Cancel" CausesValidation="false" ToolTip='close'>  
                            close  
                        </asp:LinkButton> 
                    </div> 
                    <div class="rsAdvContentWrapper">  
                        custom content here...  
                        <asp:Panel runat="server" ID="ButtonsPanel" CssClass="rsAdvancedSubmitArea">  
                            <div class="rsAdvButtonWrapper">  
                                <asp:LinkButton CommandName="Update" runat="server" ID="UpdateButton" CssClass="rsAdvEditSave">  
                        <span>Save</span> 
                                </asp:LinkButton> 
                                <asp:LinkButton runat="server" ID="CancelButton" CssClass="rsAdvEditCancel" CommandName="Cancel" 
                                    CausesValidation="false">  
                        <span>Cancel</span> 
                                </asp:LinkButton> 
                            </div> 
                        </asp:Panel> 
                    </div> 
                </div> 
            </AdvancedEditTemplate> 


    Regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bob Everland
    Bob Everland avatar
    9 posts
    Member since:
    Mar 2009

    Posted 11 Aug 2009 Link to this post

    That worked, I will edit it some more and if I have no more problems I'll mark that as the answer.
  5. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 20 Nov 2009 Link to this post

    Does simply setting up the Advanced Edit Template enable it?
    Or do I need to set a property somewhere like UseAdvancedFormTemplate = true or something?

    EDIT: Also, in the sample it is not clear how to go about incorporating the AdvancedForm.ascx web control in the project. How does the radScheduler know to use the AdvacnedForm.ascx file when I include it in my project?

    EDIT:

    I think I'm slowly getting at what needs to be done here.
    You create (or include) the AdvancedForm control and registerit in your web page (default.aspx)

    <%@ Register Src="AdvancedForm.ascx" TagName="AdvancedForm" TagPrefix="scheduler" %> 

    Then you use the prefix of that control in the Edit Template Element of the Scheduler to tell it what the edit and insert forms of the advanced form control should be used...

            <AdvancedEditTemplate> 
                <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>' 
                    Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' 
                    Continent='<%# Bind("Continent") %>' 
                    Country='<%# Bind("Country") %>'/> 
            </AdvancedEditTemplate> 

  6. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 23 Nov 2009 Link to this post

    Hi towps,

    Here is the help topic that we created as a result of Bob's question:
    http://www.telerik.com/help/aspnet-ajax/scheduler-custom-modal-advanced-template.html

    When using the AdvancedForm control as in the sample that you have referred to, you don't need to apply the workaround from the help topic, since we have already designed the AdvancedForm in such a way as to be used directly without any issues.


    All the best,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  7. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 24 Nov 2009 Link to this post

    I can't help but think that the demo pages for Schedular are sorely lacking in any meaningful examples of what can be done with the control.

    --
    Stuart
  8. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 24 Nov 2009 Link to this post

    Hello Stuart,

    Do you have any particular scenarios in mind that you would like to see as examples?

    Regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 25 Nov 2009 Link to this post

    How about a properly working example of a modal advanced insert/edit?

    Something clever like an advanced insert/edit with a tabbed interface would be good too. Say with all the 'standard' stuff on the first tab, recurrence details (if the user checked an option for it) on a 2nd tab and resources on a third.

    --
    Stuart
  10. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 25 Nov 2009 Link to this post

    I think Stuart has a point here.
    I would like to see a good example of how to get and use custom controls in the advanced modal form; bind on update and retrieve values from the controls on insert etc.

    I'm working with this stuff right now and I'm not able to find the information i'm looking for quickly enough.

    For instance can I only bind Telerik.Web.Ui.Appointment objects to the scheduler?
    How do I make the scheduler aware of custom drop downs (or any other control) on the advanced form?
    How can I tell the scheduler to bind those controls to set values properly when the user is editing an appointment?
    If I can only bind Appointment objects, how does the scheduler know about my custom properties?

    I tried extending a custom class from Appointment that had gets and sets for the custom properties I needed to expose on the advance form but the Schedule Provider MUST implement methods that use Appointment objects. My custom class doesn't work even though it extends appointment.
    It's just this last bit of info I need to get my head around.
  11. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 25 Nov 2009 Link to this post

    I've inherited a lot of Scheduler code. When I first looked at it I though the author must have been out of his mind, but looking at what little I've been able to find, it really /is/ this difficult!

    A well worked example would go a huge way to making working with the scheduler as pleasant as the rest of the Suite. As it is I'm frightened to touch anything in case it breaks!

    -- 

    Stuart

  12. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 25 Nov 2009 Link to this post

    Hi Stuart,

    Thank you for your sincere feedback. The advanced templates from older versions have been indeed cumbersome, but I believe we have gone a long way from back then to the current much simplified version of the advanced templates. 

    We have recently had a question on how to integrate RadEditor in the advanced form and here is the answer that we provided:

    "
    You might be surprised to find out how easy is to integrate not only RadEditor, but just about anything in the advanced form of RadScheduler using the advanced templates.

    Please, download a working sample from here (SchedulerCustomAdvancedFormQ3_2009.zip). Then edit CS/AdvancedForm.ascx to comment the description RadTextBox and add a RadEditor control like this:
    <%-- <telerik:RadTextBox runat="server" ID="DescriptionText" TextMode="MultiLine" Columns="50"
                       Rows="5" Width="100%" Label='<%# Owner.Localization.AdvancedDescription + ":" %>'
                       Text='<%# Eval("Description") %>' />--%>
                   <telerik:RadEditor ID="DescriptionText" runat="server">
                   </telerik:RadEditor>

    In AdvancedForm.ascx.cs, modify the Description property like this:
    [Bindable(BindableSupport.Yes, BindingDirection.TwoWay)]
            public string Description
            {
                get
                {
                    return DescriptionText.Content;
                }
      
                set
                {
                    DescriptionText.Content = value;
                }
            }

    That's it! You can now enjoy a fully functional RadEditor in the advanced form of RadScheduler. What's more, the content along with the formatting of the Description field will be displayed in the AppointmentTemplate as well. 
    "
    I think this example illustrates how easy it is to work with the advanced templates.

    Of course, there is always room for improvement. We value your feedback and we will continue our efforts to provide better controls and better examples.


    Regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  13. CHU Sainte-Justine
    CHU Sainte-Justine avatar
    17 posts
    Member since:
    Jul 2006

    Posted 02 Dec 2009 Link to this post

    Good evening Peter

    Any suggestion on how to debug the advanced form when an error occurred.  Right now the form simply doesn't display.  It will make my life easier if we can have the error.
  14. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 04 Dec 2009 Link to this post

    Hello CHU Sainte-Justine,

    Here are a couple of useful links on how to debug in Visual Studio:

    http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx

    http://blogs.msdn.com/sburke/archive/2008/01/16/configuring-visual-studio-to-debug-net-framework-source-code.aspx

    Regarding RadScheduler in particular, do you get any java script errors when trying to open the advanced form? I recommend you review the help topic on customizing the advanced form as it might give you clues what might be the problem in your case:
    http://www.telerik.com/help/aspnet-ajax/schedule_advancedformtemplate.html


    Kind regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017