Skip to main content
A newer version of this page is available. .
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.v19.1.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.

Example

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

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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the EditItemTemplate property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also