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

Warning: the VStudio2012 Extensions and new project wizard currently don't work for MVC4

5 Answers 285 Views
Installer and VS Extensions
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Patrick asked on 27 Aug 2012, 01:08 PM
I've reported this as a bug via a support ticket, but just wanted to warn anyone else who might be, or might be thinking of using the current extensions to Visual Studio 2012, either to create a new MVC4 project with KendoUI, or to use the "Telerik, KendoUI for ASP.NET MVC, Configure project" menu to configure a standard MVC4 project to use KendoUI:

My advice is don't until these problems have been fixed!

  1. The new project wizard does not produce an MVC4 project when you ask it to, it produces an MVC3 one instead.  
  2. The configure project wizard does not currently do its job properly for MVC4 projects.  (I have wasted hours on trying to find out why my project wouldn't work before realising that this was the reason, not something I had done in my code!).  It seems to follow steps recommended for manual configuration of an MVC3 project and not those for an MVC4 one (e.g. if doesn't amend the bundles, seems to include jquery twice).
Until the bugs in these extensions/wizards are correct, if my own experience is anything to go by, you are likely to find your project is plagued with error messages that will send you off on wild goose chases (because actually they aren't closely related to the problem at all!) like:

"This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet"
(this can be a genuine error in some situations, but here it wasn't, it was caused by the kendoGrid method not being recognised in javascript)  Moral [something which I'm not used to, having programmed server side for as long as possible]: keep the Javascript console open and watch out for any red warnings/error messages!

- when I scrolled my grid horizontally, the headings didn't move ...

Overall, I'm only about 30% happy with the way KendoUI has been trumpeted with great fanfare, whilst only half working with MVC4. In many cases the documentation has been wrong (I've had to point out corrections several times) and it is still very incomplete, and these extensions don't seem to have been tested much before release.  
Rant over, but this is disappointing from Telerik, who seem to have such great products otherwise.

5 Answers, 1 is accepted

Sort by
0
Patrick
Top achievements
Rank 2
answered on 27 Aug 2012, 05:18 PM
If (given that the extensions/wizards don't yet work properly) like me you are having to configure your MVC4 projects manually for KendoUI and are following the instructions at http://docs.kendoui.com/documentation/getting-started/using-kendo-with/aspnet-mvc/introduction 

you will need to copy over the EditorTemplates folder from the distribution to your Views/Shared/ folder, because the instructions currently omit to mention this ...
0
Andrey
Telerik team
answered on 30 Aug 2012, 01:55 PM
As we are still working out the issues in your support ticket, I will add my comments here as well:

We are not aware of such issues with our VSExtensions and ASP.NET MVC 4. The VS Extensions are indeed creating script tags in your master page/layout file and not using Mvc 4 bundles - that should not cause any issues. We will be adding support for optionally creating bundles or just script tags in one of our next releases.

We could continue our communication here or in the support ticket. I will update the forum thread with our findings as soon as we work things out if we continue there.

All the best,
Andrey
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Patrick
Top achievements
Rank 2
answered on 08 Sep 2012, 09:25 PM
I've retested things by creating new projects, and I'm still experiencing the same problems with the wizards that I had before.  I've updated the support thread and included copies of the projects showing the problems.
0
Patrick
Top achievements
Rank 2
answered on 15 Sep 2012, 07:23 AM
Just to update this for other users:

Problems remain on this, and I continue to be very disappointed by what looks very much like a lack of even basic testing by the Telerik team in this area.  Worse, I report problems only to be told that I must have made a mistake, I then supply very simple examples created using the extensions and wizard which demonstrate the problems.  

I then got a response which did concede that yes, there was a problem with the configure wizard, but said that the inclusion of the line @Scripts.Render("~/bundles/jquery") "in your layout page" was to blame and that removing this should solve the problem.  It wasn't my layout page, instead it was the standard layout page produced by the Visual Studio MVC4 template, which should have been obvious.

I commented out the @Scripts.Render("~/bundles/jquery") line, and problems still remain: filtering and sorting doesn't work in the Kendo grid.  

0
Andrey
Telerik team
answered on 24 Sep 2012, 08:29 AM
Hi all,

Just summarizing our findings in the support ticket thus far:
  1. "Object has no method 'kendoGrid'" javascript error
    • Issue: Kendo widgets using jQuery.data() do not work properly because the Microsoft ASP.NET MVC 4 template includes jQuery at the end of the main layout page, whereas the Kendo scripts are included in the beginning of the layout page, as is our general recommendation.
    • Resolution: Manually removing the jQuery scripts from the end of the layout page. 
    • Reason for the VS Extensions not handling that automatically: The VS Extensions will never, under any circumstance remove or modify code which has not been generated by the VS Extensions and is not related to the Kendo product. Doing so could result in removing portions of custom code, resulting in unexpected issues.
  2. Grid sorting not working
    • Issue: Grid sorting does not work correctly due to a missing script reference (kendo.aspnetmvc.min.js) required for the sorting.
    • Resolution: This is improved in the latest VS Extensions and the above-mentioned script reference is always included along with kendo.all.min.js. Users optimizing their page size are free to remove those script references and set up their own, only containing the scripts they actually require.
  3. Grid filtering not working
    • Issue: Grid filtering does not work correctly due a specific global css entry in the Microsoft ASP.NET MVC 4 template breaking the filter button's appearance:
      th a {
              display: block;
              position: relative;
          }
    • Resolution: Manually removing the entry from the Site.css file or upgrading to the latest kendo version. The issue has been fixed by having added some rules to block the above rule as an exception, because it can cause significant user confusion. We generally avoid adding such rules as to not pollute the product with unnecessary code and complexity. The default Site.css file is just an example, which is not supposed to make it to any production site.
    • Reason for the VS Extensions not handling this case: Same as the first issue - the VS Extensions will never, under any circumstance remove or modify code which has not been generated by the VS Extensions and is not related to the Kendo product.

Regards,
Andrey
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Installer and VS Extensions
Asked by
Patrick
Top achievements
Rank 2
Answers by
Patrick
Top achievements
Rank 2
Andrey
Telerik team
Share this question
or