TreeListCommandColumnButtonEventArgs.GetValue(String) Method
In This Article
Returns the value of the specified cell within the processed node.
Namespace: DevExpress.Web.ASPxTreeList
Assembly: DevExpress.Web.ASPxTreeList.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
field |
String | A String value that specifies the name of the data source field. |
#Returns
Type | Description |
---|---|
Object | An object that represents the specified cell’s value. |
#Remarks
The following example illustrates how to hide custom command buttons depending on the node type by handling the ASPxTreeList.CommandColumnButtonInitialize event and using the GetValue method.
protected void Test_CommandColumnButtonInitialize(object sender, TreeListCommandColumnButtonEventArgs e) {
if(e.ButtonType == TreeListCommandColumnButtonType.Custom) {
if(e.NodeKey != null) {
bool isFolder = (bool)e.GetValue("IsFolder");
if(!isFolder)
e.Visible = DevExpress.Utils.DefaultBoolean.False;
}
}
}
See Also