Back to Devexpress

DxTreeView.IconCssClassExpression Property

blazor-devexpress-dot-blazor-dot-dxtreeview-70d51edf.md

latest2.2 KB
Original Source

DxTreeView.IconCssClassExpression Property

OBSOLETE

This property is obsolete now. Add the DataMappings tag to markup, define a collection of DxTreeViewDataMapping items, and map item properties to data source fields instead.

Specifies an expression that returns the name of a CSS class applied to a node’s icon.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Browsable(false)]
[Obsolete("This property is obsolete now. Add the DataMappings tag to markup, define a collection of DxTreeViewDataMapping items, and map item properties to data source fields instead.")]
[Parameter]
public Expression<Func<object, string>> IconCssClassExpression { get; set; }

Property Value

TypeDescription
Expression<Func<Object, String>>

A lambda expression that returns the name of a CSS.

|

Remarks

When the DxTreeView component is bound to a data source, use the IconCssClassExpression property to specify the lambda expression that returns the name of a CSS class applied to a node’s icon.

razor
<DxTreeView Data="@ChemicalElements" 
            TextExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Title)"
            NameExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Name)"
            NavigateUrlExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Url)"
            IconCssClassExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Icon)"
            ChildrenExpression="@(dataItem => ((ChemicalElementGroup)dataItem).Groups)">
</DxTreeView>

Online Demo

TreeView - Binding to Hierarchical Data

See Also

DxTreeView Class

DxTreeView Members

DevExpress.Blazor Namespace