Kendoui grid batch edit error: kendo.all.min.js SCRIPT1004: Expected ';' - asp.net-mvc

I am facing a very annoying problem with the kendoui grid of kendo-ui version 2013.1.514.
Following the demo on http://demos.kendoui.com/web/grid/editing.html I created a small demo app for updating employees in a database.
Pretty simple.
Now as soon as I add or update some employee in the grid and press save, the server handlers are called as expected and everything works fine. However, when the handlers are done, back on the client I get this awful script error: "kendo.all.min.js SCRIPT1004: Expected';'"
I already searched through the web and all i found for this problem was that you should make sure, you load the KENDO and other JS scripts in the right order.
However, as I am using the KENDO project template for MVC, I never changed anything in the order of the js files, as they were already created by the project wizard.
I also added a sample solution, that you can get from: http://sdrv.ms/12x0Zw3
Please tell me what I am doing wrong?

Ok.. figured it out.
In my action methods I just returned the viewmodels that were passed in.
However, the grid expects the updated viemodels (e.g.: viewmodel for added item has id==0 when it comes in, but should be returned with a valid id > 0)
An excellent description can be found in the docs of telerik:
http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/batch-editing

Related

Where is the default 'Login' view and corresponding controller in the template MVC Core application in VS2019

Odd one this, I must be missing something obvious but with a brand new MVC web application, with Authentication, it builds the DB migrations for the asp user tables and puts the _LoginPartial in _Layout etc. and login works fine, I can login and register etc but I can't find the view or code to alter it.
I navigate to localhost:blah/Identity/Account/Login and can login, but there's no view in the project that corresponds, there's an /Areas/Identity folder but it only has /Pages under it, no /Account and there's no Login.cshtml or anything called Account anywhere in the project.
Very odd, I keep thinking I'm just being dim and will look again tomorrow but have done that a few times. I've tried searching for it but only find false matches.
I've created a brand new application from the template a few times now thinking I somehow messed up the choices in the dialogues but it seems so basic - the view is obviously somewhere as it loads up and works fine, but where's MVC getting it view from, and where is the controller it's calling ??
Similarly, I search the project for some text on the page, eg. 'Use a local account to log in', both in VS and using grep on the entire source folder but it's not anywhere.
To fill out the answer to the question behind my question - i.e. how can I customise the login page. To generate the views and code in-project, right click on the Areas/Identity folder in the project, select 'Add' and 'New Scaffolded item...', select Identity and go from there.
Trying that generated an error for me, with a Core 2.2 project; but I retried in a virgin Core 2.1 solution and it worked OK, I then transferred the added folders and files to my 2.2 solution, changed the namespaces to match and I can now alter the login form and log in with it OK.
The account management function to change the phone number also works, so seems like it's all hooked up OK, I've not tried any of the other identify functionality as yet.
Thanks again to Nkosi for the answer.

Structured form submission at Jenkins project pages

I want to get user input through some textboxes on the project page in Jenkins but struggle with retrieving the values back to the server side. I've tried structured form submission in various ways but with no positive result..
I've got it to work before but that was at the config page of a job (as mentioned in the link above) which is not what I am looking for now. The documentation does not mention much about this kind of feature except in config.jelly/global.jelly which is sad...
I have the textboxes up on the project page (the page that comes up when a job has been clicked) by adding them to my jobMain.jelly file but I don't know why form submission inside <form> tags don't work now..
What I'm asking is how I get user input from the project page back to my java code so that I can manipulate it there as I desire?
Thanks!

Search result not kept when browsing back

I have a search page that uses jQuery to populate a table with search results. Search.aspx is the main page and the data is added from SearchAdd.ascx.
I decided to recreate my project and so I manually copied everything from one project to the other. Everything works and looks the same in both projects except for this thing. When I've done a search, browsed to a search result and then hit the back button in the browser, I don't get the previous search results any more.
So my question is, what do I look for?
I've checked that these are exactly the same on both projects:
viestatemode="Enabled"
jQuery scripts
global.asax
web.config
What else is there to look for? Could have anything to do with the virtual directory?
Any help is appreciated.
browser back button has nothing to do with what you have tested for. it is simply client side. it shows the thing from the browser's history, unless you have not altered the behaviour of the back button.
It had to do with the jQuery version.
In my old project I used jquery-1.4.4.min.js and in the new I used jquery-1.5.1.min.js. Switched back and the history is kept when hitting the back button.
I don't know why though?

Telerik MVC grid issue in insert mode without edit mode

HI
I have telerik mvc grid in ajax mode and editing is enabled. In my scenario i have to use only the insert mode so I disabled the edit mode. but when I run i get the javascript error on click of "Add New Record". Sample project can be downloaded from Here
I got this to work by the following:
function GridNotes_onEdit(e) {
$('#Content').after("<a class='t-button t-grid-cancel t-button-icon' href='#'><span class='t-icon t-cancel'/></a>")
.after("<a class='t-button t-grid-insert t-button-icon' href='#'><span class='t-icon t-insert'/></a>");
}
Now, this worked when I only had one field being inserted. If you have multiple columns, you may need to customize it to your specifications. But it is do-able. As well, it worked in a detail view grid.
Hope this helps...
If you are looking for an official support channel as you provided a sample project, post your request to the telerik MVC forums on their site.
Had the same issue. The answer is in-line needs the edit buttons to be there, so with in-line mode the insert breaks
This link covers this and has a fix.
http://www.telerik.com/community/forums/aspnet-mvc/grid/insert-only-with-server-editing.aspx

After updating to MVC3 RC, why don't my View Data classes show up in the Add View dialog

Background:
I just updated to the RC of MVC3, and when I went to add a Stongly-Typed View, the list of classes didn't contain the class I wanted, which has been built in my project.
Now, I did compile my project, and already have several views that work correct, but their model also doesn't show up in this list.
Since the change to this dialog in RC, what is the new criteria that makes a class show up, considering none of them in my project showed up.
They altered the way that they're displayed in MVC 3 RC. For example previously you would just scroll to:
Project.Data.Models.User
Now it's organized in reverse
User (Project.Data.Models)
This is most likely your problem. What would be nice is if they had a filter to show only local objects rather than all referenced assemblies
Had the same problem. Clean solution and build and my view models started showing up...

Resources