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

Clicking update after edit does nothing on the client

2 Answers 172 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marc Samale
Top achievements
Rank 1
Marc Samale asked on 14 May 2013, 04:58 PM
Scenario.

1.  Create a new KendoUI MVC 4 application.
2.  Copy the NorthwindDB, Controller, View, Model and supporting classes for the Grid Editing_Inline example code found from the KendoUI MVC examples install.
3. Build and run - Grid comes up, I can sort and page and add new record. 
THE ISSUE:  When I click edit - the row changes and allows me to change values.  I make sure I change some to make it dirty.  I then click Update.  I can confirm (through a breakpoint) that the Controllor Action EditingInline_Update is hit.
HOWEVER- the Grid Row DOES NOT Change back to a non-edit mode. 

I have tried all sorts of things - updating the jquery version. Making sure my script references match the examples project, etc etc.

WHAT AM I missing??

2 Answers, 1 is accepted

Sort by
0
Marc Samale
Top achievements
Rank 1
answered on 14 May 2013, 05:52 PM
Update on this issue.

I upgraded to Kendo UI 2013.1.514 and updated all my other nuget packages (except Jquery which I had to install v1.9.1 through the console.)

This issue is now weirder. 
1. On first load of the grid, if the update button is pushed after editing - I am noticing posts to both my create action and the edit action.  That is right - it is firing BOTH actions by clicking 1 button, nothing happens on the gird.
2. If I cancel and try some other rows, behavior in above stops and normal working behavior works.  Since telling users that they have to try a few times for it to work will make me lose users, I think there must be some issue.
3. If I sort on the grid, and then click edit, it works just perfectly.  So that is some good news.
0
Marc Samale
Top achievements
Rank 1
answered on 14 May 2013, 07:51 PM
SOLVED - but there may be a bug and I will leave that up to others.  read below.

So after upgrading as I mentioned above, I switched back to my own code and datasets closely modeled on the examples, and was having the same issues.  It turns out that one of my elements had a ID (model.ID) of 0 - and that 0 was causing the issue.  SO - the 0 must be reserved somehow, and thus the issue.

Now - me thinks that 0 is an int and an int is an int and it Should be a valid ID.  However - if I make sure I don't have any 0 based IDs - it works now.  I hope I can help someone as that 0 cost me about 4 plus hours and suffering and banging my head against the wall.
Tags
Grid
Asked by
Marc Samale
Top achievements
Rank 1
Answers by
Marc Samale
Top achievements
Rank 1
Share this question
or