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

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

4 Answers 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Chris asked on 16 Nov 2015, 09:00 AM
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

4 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 18 Nov 2015, 08:21 AM

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
0
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
answered on 24 Nov 2015, 07:10 AM
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

0
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
answered on 24 Nov 2015, 07:13 AM
And the Telerik DevCraft version is 2015 Q3, not Q2.
0
Dimiter Madjarov
Telerik team
answered on 24 Nov 2015, 08:55 AM

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
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Answers by
Dimiter Madjarov
Telerik team
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Share this question
or