Skip to content

DevExpress-Examples/asp-net-mvc-update-data-in-hidden-columns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Update data in hidden columns

Overview

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; }";

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Сonfigure the grid's edit functionality to update the values of hidden columns.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •