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

Batch Editing with Kendo Grid

2 Answers 168 Views
Grid
This is a migrated thread and some comments may be shown as answers.
PAUL
Top achievements
Rank 1
PAUL asked on 25 Sep 2012, 06:00 PM
I am hoping you can help me with this problem.

I have been trying to get Batch Editing to work on a grid for line items to an order for a couple of days now. At first I just went with samples I found from the demos online here and got it kind of close but not quite working. So I followed the sample that came with the product to a the letter I thought, and am having issues. Zip file attached. I created a SessionLineItemRepository and a LineItemViewModel  as seemed necessary from the sample. My problems are:

1. Now when I add an item it updates the grid but does not insert into the database. You will see in my controller that I took care of that, but I don't think it is suppose to work that way.

2.  I cannot  get _Update to work because when I edit any records, for some reason it calls the _Create method and inserts every record in the list into the table again when I click Save.

3. _Delete is never fired. At one point I had it deleting from the grid but not from the database.

4. the tab key no longer tabs from field to field when I have  .Batch(true) set for the grid. So when in add new record mode you have to click in each field to edit rather than enter data hit tab and enter data. The sample online seems to work that way.

I am not sure if I am suppose to have a separate controller for the grid or have the code in my LineItemController as I do now. But it surely is not close to working and I have tried all that I can think of. My plan now is to abondon the SessionLineitem and LineitemVeiwModel because I was a whole lot closer before I did that.

I am very new to Kendo and your help is appreciated. Sorry if I am a little slow on this stuff.

Thank you,


Paul
 

2 Answers, 1 is accepted

Sort by
0
PAUL
Top achievements
Rank 1
answered on 25 Sep 2012, 06:10 PM
 I am including my latest controller here (the one I originally sent wasn't quite where there. I had some changes in it that I forgot to change back)

With this latest, sometimes the  _Update fires when editing and then clicking save but a lot of times it fires the _Create when I am doing an update.

Delete still doesn't work. Deletes it from the grid view but doesn't fall through the controller code to delete it from the database

I figured out the tab key issue with the .Navigatable() from a forum post...

I don't know what I am missing to get the other functionality working but continue to search

Regards

Paul
0
Petur Subev
Telerik team
answered on 28 Sep 2012, 08:21 AM
Hello Paul,

I would suggest you to take a look at the offline demos which should be installed in C:\Program Files (x86)\Telerik\Kendo UI for ASP.NET MVC Q2 2012 version  (if you have used the Windows installer for KendoUI) there you can examples which show how to enable batch editing.



Regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
PAUL
Top achievements
Rank 1
Answers by
PAUL
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or