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

TypeError: h is null when clicking on appointment

9 Answers 89 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Dev
Top achievements
Rank 1
Dev asked on 16 Aug 2012, 02:07 PM
In 2012.2.724.40 using Firefox I'm getting a JavaScript error whenever I double click on an existing item in the scheduler.  Firebug reports the error in this bit of code:

_getTimeFromIndex:function(h){var i=this.get_visibleRangeStart();
Telerik.Web.UI.RadScheduler._incrementTime(i,0,this._slotDurationInMinutes*h.intervalIndex);
return i;
}

Rob

9 Answers, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 16 Aug 2012, 04:23 PM
Hi Rob,

Do you experience the same issue at our online examples:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/overview/defaultcs.aspx

If no - could you please send us your RadScheduler configuration to examine it locally?

Kind regards,
Helen
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.
0
Dev
Top achievements
Rank 1
answered on 16 Aug 2012, 04:56 PM
No, I don't seem to get the error on the examples.  Maybe I'm missing populating some data?  Where would the value for h come from?

Here is the code in the aspx:
<telerik:RadScheduler ID="RadScheduler1" runat="server" StartInsertingInAdvancedForm="false"
    SelectedView="TimelineView" DataEndField="End" DataKeyField="ID" OverflowBehavior="Expand"
    DataRecurrenceField="RecurrenceRule" OnResourceHeaderCreated="RadScheduler1_ResourceHeaderCreated"
    DataRecurrenceParentKeyField="RecurrenceParentID" OnFormCreating="RadScheduler1_FormCreating"
    DataStartField="Start" DataSubjectField="Subject" OnNavigationComplete="RadScheduler1_NavigationComplete">
    <ExportSettings>
        <Pdf PageHeight="297mm" PageWidth="210mm" PaperSize="A4" />
    </ExportSettings>
    <AdvancedForm Modal="true" />
    <AdvancedEditTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>'
            Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' />
    </AdvancedEditTemplate>
    <AdvancedInsertTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>'
            Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' Description='<%# Bind("Description") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' />
    </AdvancedInsertTemplate>
    <TimelineView NumberOfSlots="8" SlotDuration="28" HeaderDateFormat="dd/MM/yyyy" ColumnHeaderDateFormat="dd/MM/yyyy" />
    <MonthView AdaptiveRowHeight="false" />
    <ResourceHeaderTemplate>
        <asp:Panel ID="ResourceImageWrapper" runat="server" CssClass="ResCustomClass">
            <asp:Image ID="SpeakerImage" runat="server" Title='<%# Eval("Text") %>' />
            <%# Eval("Text").ToString().Split('-').ElementAtOrDefault(0) %>
        </asp:Panel>
    </ResourceHeaderTemplate>
</telerik:RadScheduler>
0
Dev
Top achievements
Rank 1
answered on 17 Aug 2012, 04:48 PM
If I change to Month view I don't get the error about h being null, but I do get this error after the popup has opened:

Sys.ArgumentUndefinedException: Sys.ArgumentUndefinedException: Value cannot be undefined.
Parameter name: handler
http://localhost/QFMUI/ScriptResource.axd?d=FRZR-9Irv9mUcdG7E0sMOIq7EqLKzXOsb9PaGd59fzxSkO3qPvz0NDwIUKzWy2r5lx-E9khOXQG0SZwKIGNu5lnUX9rhi0-rYeiI1nNrgtRnkkWkCUKWvQOqPUYi6_UP21KGIqMtw-6vMUvjmpJ7YatqbrcuxSv0tmZ3ssXO76aXyi_ncbHQYBXVagt3zM2g0&t=ffffffffcd98f1ab
Line 4744
0
Helen
Telerik team
answered on 20 Aug 2012, 11:41 AM
Hi Rob,

We are not exactly sure what might cause the issue. Please find attached a sample we created based on your markup.
It works at our side.
What is the difference in your case? Could you please modify our sample so we can see the problem locally?

Regards,
Helen
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.
0
Dev
Top achievements
Rank 1
answered on 20 Aug 2012, 12:37 PM
I've downloaded that, I'll have a look.  In the meantime I've done some further investigating.  The problem appears to be this line of code in Telerik.Web.UI.Scheduler.Views.Timeline.Model.js:

if(this._isVertical){return d("div.rsTimelineView table.rsAllDayTable",g)[0].tBodies[0].rows[e].cells[h];

When the code hits this point the value of h is 43, but there are only 7 cells in d("div.rsTimelineView table.rsAllDayTable",g)[0].tBodies[0].rows[e].cells so undefined is returned.

Rob
0
Dev
Top achievements
Rank 1
answered on 20 Aug 2012, 01:00 PM
I can get the same error message in your example project by following these steps:

  1. Edit the file Appointments_CustomTemplates.xml so that the End of Appointment with ID 1 is 2013-04-16T08:00Z
  2. Start the application, note that the appointment 'Technical meeting' now extends the entire way across the scheduler view
  3. Step the view forward so that you can see the end of the 'Technical Meeting' appointment
  4. Double click on 'Technical Meeting'

The key factor seems to be that the appointment extends across at least two pages of the timeline view.  I don't get the error on the first two pages, but I do get it on any page after that (for example, if you extend an appointment to last 5 years).

In our use case we are trying to represent occupancy of a hostel room which may last up to several years.

Rob

0
Accepted
Helen
Telerik team
answered on 20 Aug 2012, 03:08 PM
Hi Rob,

Thank you for the additional information.

I verified the bug when SlotDuration is more than 24 and logged it to our bug tracking system for additional investigation.


Regards,
Helen
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.
0
Dev
Top achievements
Rank 1
answered on 21 Aug 2012, 03:06 PM
Is this bug likely to be fixed in a hotfix or development build, or will I have to wait until the next major release?  I'm just wondering whether to develop an elaborate workaround so we can deliver in a few weeks time or whether to sit tight and await a fix.

Rob
0
Helen
Telerik team
answered on 22 Aug 2012, 11:05 AM
Hello Rob,

Our developers started working on the fix and probably it will be ready for the next internal build (expected next week).


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