Hello.
I am having a list of objects which is instance from a data model.
Anyway I am using NodeTemplate fro the items, but I need to bind a property of a control inside this NodeTemplate to a property of the datamodel. How to do that ?
for instance :
<EjsTreeView ID="tree" TValue="TreeProxyDataModel" ModelType="@ModelType" ShowCheckBox="true" HtmlAttributes="@htmlAttribute">
<TreeViewEvents TValue="@(TreeProxyDataModel )" NodeChecked="@onCheckNode"></TreeViewEvents>
<EjsContextMenu @ref="menu" Items="@menuItems" >
</EjsContextMenu>
<TreeViewFieldsSettings Id="@( nameof( TreeProxyDataModel.id ) )"
Text="@( nameof( TreeProxyDataModel.Caption ) )"
ParentID="@( nameof( TreeProxyDataModel.groupID ) )"
HasChildren="@( nameof( TreeProxyDataModel.hasChild ) )"
Expanded="@( nameof( TreeProxyDataModel.expanded ) )"
IsChecked="@( nameof( TreeProxyDataModel.selected ) )"
Tooltip="@( nameof( TreeProxyDataModel.Hint ) )"
DataSource="@treeData"></TreeViewFieldsSettings>
<TreeViewNodeAnimationSettings>
<TreeViewExpand Duration="0"></TreeViewExpand>
<TreeViewCollapse Duration="0"></TreeViewCollapse>
</TreeViewNodeAnimationSettings>
<TreeViewTemplates>
<NodeTemplate>
<div style="nodeStyle">
<div style="float:left">
<img @bind-src="@( ( @context as TreeProxyDataModel ).visibilityIndicatorPath )" @onclick="@( ( e ) => onVisibilityIconClicked( ( @context as TreeProxyDataModel ).id, e ) )" />
<img src="@( ( @context as TreeProxyDataModel ).vehivleIcon )" />
</div>
</div>
</NodeTemplate>
</TreeViewTemplates>
</EjsTreeView>
in this part :
<img @bind-src="@( ( @context as TreeProxyDataModel ).visibilityIndicatorPath )" - I wish somehow to bind the SRC property of IMG control to the visibilityIndicatorPath.