Back to Devexpress

TreeListCustomJSPropertiesEventArgs Class

aspnet-devexpress-dot-web-dot-aspxtreelist-124f8936.md

latest2.5 KB
Original Source

TreeListCustomJSPropertiesEventArgs Class

Provides data for the ASPxTreeList.CustomJSProperties event.

Namespace : DevExpress.Web.ASPxTreeList

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

NuGet Package : DevExpress.Web

Declaration

csharp
public class TreeListCustomJSPropertiesEventArgs :
    CustomJSPropertiesEventArgs
vb
Public Class TreeListCustomJSPropertiesEventArgs
    Inherits CustomJSPropertiesEventArgs

TreeListCustomJSPropertiesEventArgs is the data class for the following events:

Remarks

The ASPxTreeList.CustomJSProperties event enables you to supply any server data via the temporary properties, that can then be accessed on the client. The CustomJSPropertiesEventArgs.Properties property represents a collection of property names and values. Note that property names must begin with the ‘cp’ prefix to avoid rewriting the ASPxTreeList base properties.

Example

csharp
protected void ASPxTreeList1_CustomJSProperties(object sender,
TreeListCustomJSPropertiesEventArgs e) {
    // Scalar value
    e.Properties["cpScalar"] = "my value";

    // Nested arrays
    e.Properties["cpNestedArrays"] = new object[] { 
        "value",
        null,
        new string[] { "name1", "name2" }};

    // Hashtable
    Hashtable hash = new Hashtable();
    hash.Add("key", "value");
    e.Properties["cpHash"] = hash;
}

Inheritance

Object EventArgs CustomJSPropertiesEventArgs TreeListCustomJSPropertiesEventArgs

See Also

TreeListCustomJSPropertiesEventArgs Members

Tree List

DevExpress.Web.ASPxTreeList Namespace