Back to Devexpress

TreeListColumnEditorEventArgs Class

aspnet-devexpress-dot-web-dot-aspxtreelist-2fd64db6.md

latest2.4 KB
Original Source

TreeListColumnEditorEventArgs Class

Provides data for the ASPxTreeList.CellEditorInitialize event.

Namespace : DevExpress.Web.ASPxTreeList

Assembly : DevExpress.Web.ASPxTreeList.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class TreeListColumnEditorEventArgs :
    EventArgs
vb
Public Class TreeListColumnEditorEventArgs
    Inherits EventArgs

TreeListColumnEditorEventArgs is the data class for the following events:

Remarks

The TreeListColumnEditorEventArgs class provides properties that allow you to identify the processed data cell, its editor and value.

Example

This example shows how to prevent end-users from changing the Department of root nodes. The ASPxTreeList.CellEditorInitialize is raised when the ASPxTreeList is switched to edit mode, and enables you to initialize cell editors. If the edited node resides within the first nesting level and the processed editor corresponds to the Department column, the editor is disabled.

The image below shows the result:

csharp
protected void ASPxTreeList1_CellEditorInitialize(object sender,
TreeListColumnEditorEventArgs e) {
    if (ASPxTreeList1.FindNodeByKeyValue(e.NodeKey).Level == 1 && 
         e.Column.FieldName == "Department")
        e.Editor.Enabled = false;
}

Inheritance

Object EventArgs TreeListColumnEditorEventArgs

See Also

TreeListColumnEditorEventArgs Members

Tree List

DevExpress.Web.ASPxTreeList Namespace