Kendo UI Scaffolder (UI for MVC Grid) generate the incorrect code

5 posts, 1 answers
  1. Chris
    Chris avatar
    33 posts
    Member since:
    Oct 2015

    Posted 16 Nov 2015 Link to this post

    HI

    I found that the generated code by UI for MVC Grid are not correct.

    Add > New Scaffolded Item... > Kendo UI Scaffolder > UI for MVC Grid

      Options : Editable/Ajax/InCell/Create/Update/Destroy

    \Controllers\GridController.cs

      The code generated by the newest Kendo UI Scaffolder :

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Menus_Create([DataSourceRequest]DataSourceRequest request, MenuClass menuClass)
        {

    ASP.NET MVC source EditingController.cs

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Editing_Create([DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<ProductViewModel> products)
        {

      *Grid / Batch editing
       http://demos.telerik.com/aspnet-mvc/grid/editing


    The problems of code generated by newest Kendo UI Scaffolder :

    .[Bind] expression lacked, any changes action should marks with [Bind], Right?
    .The type of parameter Model not is IEnumerable<T>, Grid can create more than one record at a time, Right?

    The generated code of Update/Destroy have the same problems as above.


    ---------------------------------------------


    And I met another error while save changes using code generated by the newest Kendo UI Scaffolder:

    Unhandled exception at line 9, column 30392 in http://localhost:43223/Scripts/kendo/2015.3.930/kendo.all.min.js

    0x800a03ec - JavaScript Runtime error: ';' required

    function(e,t){var n=e+t;return Le[n]=Le[n]||Function("d","return "+ve.expr(e,t))},setter:function(e){return He[e]=He[e]||Function("d,value",ve.expr(e)+"=value")},accessor:function(e){...
                       
    kendo.all.min.js have BUGS ??? 
                                                                                      ===========================================================
    *Error are marks from "return He[e]=" to ""=value")".


    Visual Studio 2015 Enterprise
    Telerik DevCraft 2015 Q2

    Best regards

    Chris
  2. Answer
    Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2159 posts

    Posted 18 Nov 2015 Link to this post

    Hello Chris,

    Is the current Scaffolder version 2015.3 1111? Generally there is no template for generating InCell CRUD operations without the [Bind(Prefix = "models")] attribute. Could you assure that InCell edit mode was selected and not InLine?

    Regarding the second question, I am not sure that the error is related to the generated code, so could you send us the sample project with the generated code, so we could inspect it locally and provide assistance? I am looking forward to hearing from you.

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Chris
    Chris avatar
    33 posts
    Member since:
    Oct 2015

    Posted 24 Nov 2015 in reply to Dimiter Madjarov Link to this post

    HI

    I have check the Telerik Kendo T4 files - GridAjaxBatchController.cs.t4, GridAjaxController.cs.t4, etc.
    Sorry, Maybe I select the InCell edit mode before.

    But I think the Javascript error as above of kendo.all.min.js is really a bug,
    I hope this bug will be fixed.

    Best regards

    Chris

  5. Chris
    Chris avatar
    33 posts
    Member since:
    Oct 2015

    Posted 24 Nov 2015 in reply to Chris Link to this post

    And the Telerik DevCraft version is 2015 Q3, not Q2.
  6. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2159 posts

    Posted 24 Nov 2015 Link to this post

    Hello Chris,

    Thanks for the update. If the JavaScript error in kendo.all.min.js is still reproducing, you could send us an example with the generated code, so could inspect it locally and pinpoint the reason for it.

    Regards,
    Dimiter Madjarov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET MVC is VS 2017 Ready