GridViewDataColumn.EditItemTemplate Property
Gets or sets a template for displaying edit cells which correspond to the current column.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v18.2.dll
Declaration
[DefaultValue(null)]
public virtual ITemplate EditItemTemplate { get; set; }
<DefaultValue(Nothing)>
Public Overridable Property EditItemTemplate As ITemplate
Property Value
Type | Default | Description |
---|---|---|
ITemplate | null |
An object that implements the ITemplate interface. |
Remarks
NOTE
Once a template defined via the EditItemTemplate property is created within a control, it is instantiated within a container object of the GridViewEditItemTemplateContainer type. This container object exposes a set of specific properties to which the template's child controls can be bound.
Examples
This example shows how to use a two-way data-bound ASPxGridLookup in the edit form of ASPxGridView to update or insert new data.
MVC:
GridView - How to use GridLookup with single selection mode in EditForm
GridView - How to use GridLookup in EditForm in multiple selection mode
NOTE
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-use-two-way-data-bound-aspxgridlookup-in-edit-form-of-aspxgridview-to-edit-data-e2979
- Default.aspx.cs
- CallbackException.cs
- Default.aspx (C#)
- CallbackException.vb
- Default.aspx (VB.NET)
- Default.aspx.vb
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DevExpress.Web;
public partial class _Default : System.Web.UI.Page
{
protected void glCategory_Load(object sender, EventArgs e) {
(sender as ASPxGridLookup).GridView.Width = new Unit(500, UnitType.Pixel);
}
protected void grid_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e) {
throw new CallbackException("Operation is not allowed in demonstration mode");
}
protected void grid_RowUpdating(object sender, DevExpress.Web.Data.ASPxDataUpdatingEventArgs e) {
throw new CallbackException("Operation is not allowed in demonstration mode");
}
}