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

question about Core library installed

15 Answers 187 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Pablo
Top achievements
Rank 1
Pablo asked on 05 Feb 2019, 09:03 PM
Hello,
I'm new to Telerik and I'm trying to run your Scheduler demo for Core in my Visual Studio 2017. I installed Telerik.UI.for.AspNet.Core(2019.1.115) in my VS 2016.
But when I copy the code from your demo I get an error in: @(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.TaskViewModel>()

Under Kendo.Mvc.Examples it cannot find "Models". Did the dll changed? How can I get to Kendo.Mvc.Examples.Models.Scheduler.TaskViewModel ?

15 Answers, 1 is accepted

Sort by
0
Pablo
Top achievements
Rank 1
answered on 05 Feb 2019, 09:12 PM
The source code you provided in the demo only contains some chtml files and .cs but not the full Scheduler Visual Studio application. It would be of enormous benefit to me, and others I am sure if you could provide a zipped file with the full scheduler project.
0
Accepted
Marin Bratanov
Telerik team
answered on 06 Feb 2019, 01:15 PM
Hi Pablo,

The "Models" folder should be present in the project, and I am also attaching it here so you can copy it to your installation if it is missing for some reason. Its default path is
C:\Program Files (x86)\Progress\Telerik UI for ASP.NET Core R1 2019\wrappers\aspnetcore\Examples\AspNet.Core\VS2017\Kendo.Mvc.Examples

If you are having issues with running the sample app, I recommend the following:

  • Make sure that the .NET Core SDK for 2.2 is installed on your machine. If you just installed it, restart the machine.
  • Download again our installer or the archive with the demos and extract them anew to a location of your choice. It is possible that it got corrupted somehow (e.g., files were deleted, or file access is not allowed in the Program Files folder).

The scheduler samples consist of the following:

  • view where the widget itself is initialized
  • a controller that feeds it with data
  • models that are used in the controller and in the view
  • data that is consumed by the controller so it will be shown in the view

The entire demos application will therefore consist of .cshtml views and .cs files for the controllers and models. The data access layer is also in the application but in a real case it may not be.

The demos also contain a lot of other views, controllers and models that are used for the other widgets in the suite, so the scheduler views are not a standalone application, but elements of the entire application.

That said, I am also attaching here a very simple view + model + controller that shows a scheduler running without a database, and based on our index demo. You will see that only the model namespace is the same as in the demos, the controller and view have the namespaeces of a new sample app. I hope this also helps you move forward with running a scheduler.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Pablo
Top achievements
Rank 1
answered on 06 Feb 2019, 05:11 PM
Thank you very much Marin. This fixed my problem.
0
Pablo
Top achievements
Rank 1
answered on 06 Feb 2019, 11:46 PM
Marin,
I was able to create the Core MVC project, compile it and run it but the Scheduler doesn't show. The page shows blank. I debug it and it looks like it's working ok and it's loading the dummy data. The Scheduler is launched when the "Scheduler" tab is selected in the _Layout.cshtml.
print_screen.png has a print screen of my layout in Visual Studio 2017.
I cannot attach the whole project file in a zip because it's too large. So, I'm attaching just the relevant files. Thank you.
0
Pablo
Top achievements
Rank 1
answered on 06 Feb 2019, 11:53 PM
Here are the other files. It doesn't ;et me attach them all at the same time, so I'll attach one at a time.
0
Pablo
Top achievements
Rank 1
answered on 06 Feb 2019, 11:56 PM
Controller.
0
Pablo
Top achievements
Rank 1
answered on 06 Feb 2019, 11:58 PM
Bottom part of controller.
0
Pablo
Top achievements
Rank 1
answered on 07 Feb 2019, 12:02 AM
Model Task file.
0
Pablo
Top achievements
Rank 1
answered on 07 Feb 2019, 12:03 AM
Model TaskViewTemplate.
0
Pablo
Top achievements
Rank 1
answered on 07 Feb 2019, 12:04 AM
Model TaskViewTemplate bottom of the file.
0
Pablo
Top achievements
Rank 1
answered on 07 Feb 2019, 01:01 AM

This is how the screen looks like when I select on the "Schedule" tab.

 

0
Pablo
Top achievements
Rank 1
answered on 08 Feb 2019, 04:14 PM
Can anybody help me?
0
Marin Bratanov
Telerik team
answered on 09 Feb 2019, 05:43 PM
Hello Pablo,

Can you confirm that the rest of the markup on the page is valid, that all network requests return successfully and that there are no script errors on the page?

Then, does this happen only with IE? If so, perhaps it is running in Compatibility Mode which makes it behave like IE7 and so a lot of things will break.

I am attaching here a layout to go with my previous sample so you can run it fully. I made it use CDNs in all cases, so no local resources should be needed for it. Just make sure that the version in the CDN url matches the version you are using for the UI for ASP.NET Core package. 

Also, can you confirm you followed the steps from both of these articles in order to add Telerik UI for ASP.NET Core to your project:

If this does not help you get this running, I advise that you open a support ticket and send us a simple runnable project that showcases the problem with the Kendo widgets you are facing. There is nothing obviously wrong in the provided screenshots, but without being able to run and debug a problem it's quite difficult to provide a more concrete answer.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Pablo
Top achievements
Rank 1
answered on 12 Feb 2019, 11:53 PM
Thank you Marin, it works fine and my boss likes it. Any hints or examples on how to connect to a SQL Server table? How do I define the DataSource in Kendo? Thanks!
0
Marin Bratanov
Telerik team
answered on 13 Feb 2019, 05:11 PM
Hi Pablo,

The Kendo widgets need to get the proper array of JSON literals (or, in some cases, a single JSON literal or maybe string, this depends on the particular case, although, usually, it is an array of literals, you can see examples in our demos). 

So, it is up to the server to provide that data and the exact means are entirely up to the application developers as this depends on the concrete data access layer implementation the project has, and the development preferences, coding standards, and other particulars.

Once you can fetch the data from the database, you will be able to replace the hardcoded data I had in my examples with actual live data by following the same method signatures and return logic.

I could suggest you start by examining the following tutorials from MSDN on connecting razor pages to a database:

 


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Scheduler
Asked by
Pablo
Top achievements
Rank 1
Answers by
Pablo
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or