Grid View for ASP.NET MVC - How to update data in hidden columns
This example demonstrates how to configure the grid's edit functionality to update the values of hidden columns.
Handle the grid's server-side CustomJSProperties event to get the edited row values and pass them to the client.
settings.CustomJSProperties = (sender, e) => {
MVCxGridView gridView = (MVCxGridView)sender;
if (gridView.EditingRowVisibleIndex > -1) {
e.Properties["cpMiddleName"] = gridView.GetRowValues(gridView.EditingRowVisibleIndex, "MiddleName");
}
};
To pass the values from the server to the update action method, handle the grid's client-side BeginCallback event.
settings.ClientSideEvents.BeginCallback = "function(s, e) { if(s.cpMiddleName) e.customArgs['MiddleName'] = s.cpMiddleName; }";