Sunday, 15 July 2012

jquery - Duplicate a row in JQGrid and save it to model, using mvc4 visual studio 2012 -


Good day, this is my first question in StackVareflow, I need to duplicate a line using JQGRID, and its Save it after the database, I am using jqgrid 4.4.4, jquery, Visual Studio 2012, MVC4 and SQL Server 2008 R2. I created a custom button, the idea was that when I click it, it duplicates the selected row and when I click on the Save button, it can save the duplicate line in the database.

I duplicated the blind line, but I do not know how to save the database. Save Button Always Post With Operation Price "Edit" Has anyone done this before? Thanks for any help.

This selectec line is a duplicate code:

  newId = "new"; $ ('#' + Grid2.id) .jqGrid ('addRowData', New ID, Myadata, "After", Celi Idrro); $ ('#' + Grid2.id) .jqGrid ('setSelection', new id, incorrect); $ ('#' + Grid2.id) .jqGrid ('editRow', newId); $ ("#" + Grid2.id + "_iledit"). AddClass ('UI-state-disabled'); $ ("#" + Grid2.id + "_ilsave"). RemoveClass ('UI-state-disabled'); $ ("#" + Grid2.id + "_ilcancel"). RemoveClass ('UI-state-disabled');  


No comments:

Post a Comment