dhtmlxScheduler : JScript error - 'scheduler' is undefined

Hi Guys

I’m keen to evaluate the scheduler control for MVC I followed the straight forward instructions at the link below to get things moving but each time I run the app get the the following error. I’m sure I’m missing something simple, can anyone help?

Microsoft JScript runtime error: ‘scheduler’ is undefined




Hello Dave,
error means that js files hasn’t been loaded.
scheduler.net loads js codebase from url that stored in scheduler.Codebase property,
by default it is
/Scripts/dhtmlxScheduler folder,
if you’ve put js files somewhere else you need to specify url of codebase folder in
scheduler.Codebase property in BasicSchedulerController.Index

Hi Aliaksandr

Thanks for the quick response. You was correct I copied the files in correctly and stopped getting the error.

Everything seems to be ok now but the scheduler doesn’t seem to render. I’ve double checked I followed the intructions correcly and if I view the source of the page I can see it’s definition.

All I can see on the page is the heading 2 (

Basic Initialization

) but the scheduler is not there.

Any thoughts on what I’m missing?

I followed the instructions on the site and for the Basic Initialization I used the definition for Razor…

html, body { height:100%; padding:0px; margin:0px; }

Basic Initialization


Thanks for your help



I’ve just completly deleted the original solution and started again following the instructions step by step I got no errors but the same end result H2 is displayed but not the scheduler.



can’t really tell what might be wrong,
one possible thing - when scheduler is rendered it is adjust it’s height to the height of the parent container, if height of the parent div is 0, scheduler wouldn’t be visible
thats why there is
html, body
make sure this style is applied, if this wouldn’t help,
can you post your app here please?

You nailed it Sir!! :slight_smile:

OK, if you create a out of the box ASP.NET MVC template then within the Shared folder the file _Layout.cshtml we have the following.

    <div id="main">

So based on your last post I looked the the CSS definition for “main”

#main {
padding: 30px 30px 15px 30px;
background-color: #fff;
border-radius: 4px 0 0 0;
-webkit-border-radius: 4px 0 0 0;
-moz-border-radius: 4px 0 0 0;

No mention of Height so I added…

height: 400px;

And, I have a visible schedule control. Maybe one to add the the instructions page. In case there are any differences in the MVC templates across different versions of VS I’m using a fully updated version of VS2010 Ultimate.

If the person following the tutorial did this then the Razor definition for the Index View can be no more than…

<h2>Basic Initialization</h2>

As ever I’m sure there are a million ways of doing it!

Thanks Again


Thank you for the feedback! We will clarify that moment in docs

Hi Sir

   I am implement dhtml scheduler in asp.net website application im getting errror 'Microsoft JScript runtime error: 'scheduler' is undefined'. Is it possible to clear the error. i give the path correctly in the solution explorer. Is there any way to without using rendor method.

how did you specify the path to the scheduler codebase?
try doing it using the ResolveUrl method

Hi Aliaksandr,

I am having the same problem what dbrown has. I have followed the same procedure
and could not able to display the scheduler. I don’t know where i am doing wrong.
I have attached the sample of the project. Please help in rectifying my problem

Thanks and Regards,
mySchedulerApp.rar (970 KB)


I have solved that problem.But, I am not able to save the fields to the database and
how can i use terrace theme.

I have included the js and css files of terrace theme

where should i declare DHXScheduler.skins.terrace; method

Please provide the help

Thanks and Regards,