Tab

GridViewDataColumn.EditItemTemplate Property

Gets or sets a template for displaying edit cells which correspond to the current column.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

[DefaultValue(null)]
public virtual ITemplate EditItemTemplate { get; set; }

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

View Example

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