Trying to add model in the view using scheduler.

I use mvc4 with scheduler.
I have scheduler and a textbox in the same view.
I could render scheduler until I tried to insert the model above in the view
@model OnlineAB.Models.exampleModel

it shows the following error pointing the view that is using scheduler:
CS1061: ‘Project.Models.Schedulermodel’ does not contain a definition for ‘GenerateLinks’ and no extension method ‘GenerateLinks’ accepting a first argument of type ‘OnlineAB.Models.Schedulermodel’ could be found (are you missing a using directive or an assembly reference?)
Source File: c:\Users\user\Desktop\Proj\project\Views\Scheduler\Index.cshtml Line: 237
How i cannot add any other model in the view using the scheduler?

(Is this because scheduler is using seperate model?)

did u get the solution?

did u get the solution?

Hi,
‘GenerateLinks’ is a method of DHXScheduler class, make sure you call it from the instance of this class

public ActionResult Index()
{
var scheduler = new DHXScheduler();
}
In my view


.
@Html.Raw(Model.GenerateHTML())
I placed a code for listbox that uses another model,
and I get the error as explained above.

you should pass DHXScheduler object to the view page somehow in order to call it’s methods.
try something like:

public ActionResult Index() { var scheduler = new DHXScheduler(); ViewBag.Scheduler = scheduler; } @Html.Raw(ViewBag.Scheduler.GenerateHTML())

what is the difference between the both views?