This is a migrated thread and some comments may be shown as answers.

[Solved] Can only run AdvanceForm once

4 Answers 158 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 01 Feb 2010, 02:01 PM
I have a scheduler with a custom AdvancedForm.

The thing is that that the "All Day" and "Recurrence" checkbox's functionality only works the first time the form is loaded.

Running the form through FireBug, I notice that the second time the form is loaded, the following console message appears ...

XUL box for div element contained an inline link child, forcing all its children to be wrapped in a block.
http://localhost:4591/Collaborate/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-GB%3a0d787d5c-3903-4814-ad72-296cea810318%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.3.1314.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-GB%3a603d133a-f943-435d-a80d-57457cc55f4a%3a16e4e7cd%3aed16cbdc%3af7645509%3a86526ba7%3a874f8ea2%3a11a04f7e%3a24ee1bba%3ae330518b%3a1e771326%3ac8618e41%3a8e6f0d33%3a6a6d718d%3aa7e79140%3aa51ee93e%3a59462f1%3ae524c98b%3a650fdad%3aef9d9f4a%3a19620875%3a39040b5c%3af85f9819%3a33108d14%3abd8f85e4
Line 5117

Is this related to my problem or just a coincidence?

--
Stuart

4 Answers, 1 is accepted

Sort by
0
Stuart Hemming
Top achievements
Rank 2
answered on 01 Feb 2010, 02:03 PM
Hmmm. That's not too helpful, is it? attached is a screenshot.
0
Accepted
Peter
Telerik team
answered on 01 Feb 2010, 02:12 PM
Hi Stuart,

There was an issue witht the OnClientFormCreated handler for the customizing the advanced template demo, but we have fixed it. Please, try the following:
<script type="text/javascript">
            //<![CDATA[
  
            // Dictionary containing the advanced template client object
            // for a given RadScheduler instance (the control ID is used as key).
            var schedulerTemplates = {};
  
            function schedulerFormCreated(scheduler, eventArgs) {
                // Create a client-side object only for the advanced templates
                var mode = eventArgs.get_mode();
                if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||
                    mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
                    // Initialize the client-side object for the advanced form
                    var formElement = eventArgs.get_formElement();
                    var templateKey = scheduler.get_id() + "_" + mode;
                    var advancedTemplate = schedulerTemplates[templateKey];
                    if (!advancedTemplate) {
                        // Initialize the template for this RadScheduler instance
                        // and cache it in the schedulerTemplates dictionary
                        var schedulerElement = scheduler.get_element();
                        var isModal = scheduler.get_advancedFormSettings().modal;
                        advancedTemplate = new window.SchedulerAdvancedTemplate(schedulerElement, formElement, isModal);
                        advancedTemplate.initialize();
  
                        schedulerTemplates[templateKey] = advancedTemplate;
  
                        // Remove the template object from the dictionary on dispose.
                        scheduler.add_disposing(function() {
                            schedulerTemplates[templateKey] = null;
                        });
                    }
  
                    // Are we using Web Service data binding?
                    if (!scheduler.get_webServiceSettings().get_isEmpty()) {
                        // Populate the form with the appointment data
                        var apt = eventArgs.get_appointment();
                        var isInsert = mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert;
                        var editSeries = eventArgs.get_editingRecurringSeries();
                        advancedTemplate.populate(apt, isInsert, editSeries);
                    }
                }
            }
  
            //]]>
        </script>  


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.
0
Stuart Hemming
Top achievements
Rank 2
answered on 01 Feb 2010, 02:36 PM
Peter,

Thanks for the speedy response.

FYI, the problem with the checkboxes not working has been solved, but I still see the warning ...

"XUL box for div element contained an inline link child, forcing all its children to be wrapped in a block."

I don't know if this is important or not, but it only shows after the form has been dismissed at once.

--
Stuart
0
T. Tsonev
Telerik team
answered on 01 Feb 2010, 04:04 PM
Hello,

We see this warning a lot, but I don't think it's critical. Looks like an internal message from the Firefox rendering engine that can be dismissed.

Regards,
Tsvetomir Tsonev
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.
Tags
Scheduler
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Stuart Hemming
Top achievements
Rank 2
Peter
Telerik team
T. Tsonev
Telerik team
Share this question
or