We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

MVC - Problem with EJS Grid Control to Update the record

HI, i have create a simple project MVC which contains a grid,

1) Side Razori i have insert a Grid

List<object> cols = new List();
cols.Add(new { field = "RuoCodice", direction = "Ascending" });

.DataSource(dataManger =>

.AllowMultiSorting().AllowSorting().AllowFiltering().FilterSettings(r => r.Type(FilterType.Excel))
.Columns(col =>
.ValidationRules(new { required = true, maxLength = 8 })
.CustomAttributes(new { @class = "wrapped-cell" }).Add();
col.Field("RuoDescrizione").HeaderText("Descrizione").Width("75%").CustomAttributes(new { @class = "wrapped-cell" }).Add();

}).SortSettings(sort => sort.Columns(cols))
.EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(EditMode.Dialog); })
.Toolbar(new List() { "Add", "Edit", "Delete","Update","Cancel" })


2) Server side popolate the grid from db

public ActionResult GetRuoli()
List lista = ToDoRmb.Core.Query.Accessi.CaricaListaRuoli().ToList();
return Json(new { result = lista, count = lista.Count() }, JsonRequestBehavior.AllowGet);

The code work OK, the grid is load and show the data.

The problem is the press edit and press the button SAVE, the method Edit is call OK, but the record is empty.

2 Replies

AU Aurelio January 20, 2019 12:57 AM UTC

Hi, i have resolve the problem.

 public ActionResult Update(Ruoli value )
          return Json(value);

The problem here the name of parameter, the name of the parameter for reveced the record si for convention "value".

Sorry, close the post.

Many Thanks


PS Pavithra Subramaniyam Syncfusion Team January 21, 2019 06:35 AM UTC

Hi Aurelio, 
Thanks for contacting Syncfusion support. 
We are happy to hear that your problem has been resolved. 
Please contact us if you need any further assistance. 
Pavithra S. 

Live Chat Icon For mobile
Up arrow icon