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

[Solved] Groupby Javascript Error

3 Answers 99 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Matthias S
Top achievements
Rank 1
Matthias S asked on 28 Jul 2009, 03:30 PM
Hi,

I'm trying to figure out why I'm getting the following js errors:
-_1.GroupedByResource is undefined (...Views/Month/GroupedByDate/Model.js)

_1.GroupedByResource is undefined (...Views/Timeline/GroupedByDate/Model.js)

I have disabled all embedded ressources and add the necessary scripts with a script manager.
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
            <Scripts> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Common/Core.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Ajax/Ajax.js" />                 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Common/jQuery.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Common/jQueryPlugins.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Common/Navigation/NavigationScripts.js" />              
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Calendar/RadDatePicker.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Input/TextBox/RadInputScript.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Input/DateInput/RadDateInputScript.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Calendar/RadCalendarCommonScript.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Calendar/RadCalendarScript.js" />                 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Calendar/RadDateTimePickerScript.js" />                 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Scheduler/RadSchedulerScripts.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Scheduler/Scheduling/AdvancedTemplate.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Scheduler/Views/Month/Model.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Scheduler/Views/Month/GroupedByDate/Model.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Scheduler/Views/Month/GroupedByResource/Model.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Scheduler/Views/Timeline/Model.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Scheduler/Views/Timeline/GroupedByDate/Model.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Scheduler/Views/Timeline/GroupedByResource/Model.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Scheduler/Views/Week/Model.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Scheduler/Views/Week/GroupedByDate/Model.js" /> 
                <asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Scheduler/Views/Week/GroupedByResource/Model.js" /> 
                <asp:ScriptReference Path="~/includes/Scheduler.js" /> 
            </Scripts> 
        </telerik:RadScriptManager> 

and my scheduler looks like that:
<telerik:RadScheduler ID="RadScheduler1" runat="server" DataKeyField="ID" DataStartField="Start" DataEndField="End" DataSubjectField="Title" 
                        ShowHeader="false" AllowInsert="true" 
                        FirstDayOfWeek="Monday" LastDayOfWeek="Friday"  
                        ShowAllDayRow="true"  
                        OnClientAppointmentInserting="AppointmentInserting" OnClientAppointmentEditing="AppointmentEditing" OnAppointmentDelete="RadScheduler1_AppointmentDelete"  
                        OnClientAppointmentResizeEnd="AppointmentResizeEnd" OnClientAppointmentMoveEnd="AppointmentMoveEnd" > 
                <TimelineView UserSelectable="false" /> 
            </telerik:RadScheduler> 

All Appointments are being inserted in codebehind (no databind).

Used Control Version: RadControls ASP.NET AJAX 2009 1 527

Hopefully somebody already had that error.






3 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 29 Jul 2009, 02:37 PM
Hi Matthias,

Thank you for reporting this issue. The documentation was not up-to-date. Here are the right scripts and the right order of registration:
<asp:ScriptManager ID="ScriptManager1" runat="server">  
        <Scripts> 
            <asp:ScriptReference Path="~/Scripts/Common/Core.js" /> 
            <asp:ScriptReference Path="~/Scripts/Common/Popup/PopupScripts.js" /> 
            <asp:ScriptReference Path="~/Scripts/Common/jQuery.js" /> 
            <asp:ScriptReference Path="~/Scripts/Common/jQueryPlugins.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/RadSchedulerScripts.js" /> 
              
           <%-- ClientRenderingScripts are required only for web services mode.--%> 
           <%-- <asp:ScriptReference Path="~/Scripts/Scheduler/ClientRendering/ClientRendering.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/ClientRendering/BlockCollection.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/ClientRendering/HorizontalBlockCollection.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/ClientRendering/RenderingManager.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/ClientRendering/ResourceStyleMapping.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/ClientRendering/ResourceStyleMappingCollection.js" />--%> 
              
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/Week/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/Week/GroupedByResource/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/Week/GroupedByDate/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/MultiDay/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/MultiDay/GroupedByResource/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/MultiDay/GroupedByResource/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/Day/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/Day/GroupedByResource/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/Month/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/Month/GroupedByResource/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/Month/GroupedByDate/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/Timeline/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/Timeline/GroupedByResource/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Views/Timeline/GroupedByDate/Model.js" /> 
            <asp:ScriptReference Path="~/Scripts/Calendar/RadCalendarCommonScript.js" /> 
            <asp:ScriptReference Path="~/Scripts/Calendar/RadCalendarScript.js" /> 
            <asp:ScriptReference Path="~/Scripts/Scheduler/Scheduling/AdvancedTemplate.js" /> 
            <asp:ScriptReference Path="~/Scripts/Input/TextBox/RadInputScript.js" /> 
            <asp:ScriptReference Path="~/Scripts/Calendar/RadDatePicker.js" /> 
            <asp:ScriptReference Path="~/Scripts/Input/DateInput/RadDateInputScript.js" /> 
            <asp:ScriptReference Path="~/Scripts/Calendar/RadDateTimePickerScript.js" /> 
            <asp:ScriptReference Path="~/Scripts/Common/Navigation/NavigationScripts.js" /> 
            <asp:ScriptReference Path="~/Scripts/ComboBox/RadComboBoxScripts.js" /> 
            <asp:ScriptReference Path="~/Scripts/Input/NumericTextBox/RadNumericInputScript.js" /> 
        </Scripts> 
    </asp:ScriptManager> 

Let us know if you continue to experience problems.


All the best,
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.
0
Matthias S
Top achievements
Rank 1
answered on 30 Jul 2009, 08:15 AM
Thanks for the quick answer!

But to get everything work you also need to add a ref to
<asp:ScriptReference Path="~/thirdparty/RadControlsAjax/Scripts/Ajax/Ajax.js" /> 

in case somebody needs that too.
0
Peter
Telerik team
answered on 30 Jul 2009, 12:00 PM
Hi Matthias,

Thank you for your feedback. Yes, if you use RadAjax you need a reference to that javascript file as well.


Greetings,
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.
Tags
Scheduler
Asked by
Matthias S
Top achievements
Rank 1
Answers by
Peter
Telerik team
Matthias S
Top achievements
Rank 1
Share this question
or