The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxTreeList.JSProperties Property

Gets a collection of temporary client properties.

Namespace: DevExpress.Web.ASPxTreeList

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

Declaration

public Dictionary<string, object> JSProperties { get; }
Public ReadOnly Property JSProperties As Dictionary(Of String, Object)

Property Value

Type Description
Dictionary<String, Object>

The collection of property names and values.

Remarks

Use the JSProperties property to add new properties that can be accessed on the client.

Note

The only requirement is that property names must begin with the 'cp' prefix (acronym for 'client property'), to avoid rewriting the ASPxTreeList base properties.


// Scalar value
ASPxTreeList1.JSProperties["cpScalar"] = "my value";

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

// Hashtable
Hashtable hash = new Hashtable();
hash.Add("key", "value");
ASPxTreeList1.JSProperties["cpHash"] = hash;

The following code demonstrates how the grid's current page index can be passed to and obtained on the client side.


ASPxTreeList1.JSProperties["cpPageIndex"] = ASPxTreeList1.PageIndex;
See Also