ASPxTreeList.JSProperties Property
Gets a collection of temporary client properties.
Namespace: DevExpress.Web.ASPxTreeList
Assembly: DevExpress.Web.ASPxTreeList.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
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.
See Also