ASP.NET.in.a.Nutshell.Second.Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

ASP.NET.in.a.Nutshell.Second.Edition [Electronic resources] - نسخه متنی

G. andrew Duthie; matthew Macdonald

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید









EditCommandColumn

System.Web.UI.WebControls (system.web.dll)class

The EditCommandColumn class is a special type of
column used with the DataGrid control. It provides
an "Edit" button or link (depending
on the ButtonType property) that, when clicked,
fires the DataGrid.EditCommand event. This event
allows you to initiate editing for a row by using the
DataGrid.EditItemIndex property (after which you
must rebind to the data source).

While editing is in progress, the
EditCommandColumn displays
"Cancel" and
"Update" buttons instead of an
"Edit" button. These will trigger
the DataGrid.CancelCommand and
DataGrid.UpdateCommand events, respectively. In
these events, you can add the code required to commit changes to the
data source and cancel editing (by setting
DataGrid.EditItemIndex to -1). Rebind to the data
source before returning the page.

Note that you must provide values for the
CancelText, EditText, and
UpdateText properties (like
"Cancel",
"Edit", and
"Update"). Otherwise, the
associated command buttons will not appear in the column when editing
is underway.

public class 

EditCommandColumn : DataGridColumn {
// Public Constructors
public

EditCommandColumn ( );
// Public Instance Properties
public virtual ButtonColumnType

ButtonType {set; get; }
public virtual string

CancelText {set; get; }
public virtual string

EditText {set; get; }
public virtual string

UpdateText {set; get; }
// Public Instance Methods
public override void

InitializeCell (TableCell

cell , int

columnIndex , ListItemType

itemType );
// overrides DataGridColumn
}



Hierarchy


System.Object
DataGridColumn(System.Web.UI.IStateManager)
EditCommandColumn


/ 873