The built-in Edit Form is one of the ASPxGridView editing modes that allows end-users to edit column values within grid cells. The Edit Form is displayed when the Edit command button is clicked. You can specify edit cell visibility, position and appearance within the Edit Form.
This topic describes how to manipulate edit forms, and customize their layout and appearance using style settings and templates.
The Edit Form displays edit cells that correspond to data columns, and the Cancel/Update commands that allow end-users to discard changes or save them to a database.
Each edit cell displays a column caption and a corresponding editor. Individual columns provide settings for individual edit cells, which allow you to provide various Edit Form layouts. If you wish to use a custom layout rather one the one produced by default, compose a template using the GridViewSettings.SetEditFormTemplateContent method.
The code sample below demonstrates how to define a template for the edit form. In this example, all data editors are organized in a single column using the FormLayout extension. FormLayout automatically adds the required marks to the captions of the required fields.
public class HomeController : Controller
MyProject.Models.northwndEntities db = new MyProject.Models.northwndEntities();
// Returns the partial view that contains an edit form bound to the edited item.
public ActionResult EditFormPartial(String currentCustomerID)
var model = db.Customers;
var item = model.FirstOrDefault(it => it.CustomerID == currentCustomerID);
return PartialView("_EditFormPartial", item);