1
Answer

How to change color of tree node for particular node

suman goud

suman goud

8y
252
1
in database if the column Type=Master then i want to change color of that node if null set default color
 t
@helper GetTreeView(List<AccountsPageLayout.MasterNode> siteMenu, int parentID)
{
foreach (var i in siteMenu.Where(a => a.ReportsTo.Equals(parentID)))
{
<li>
@{var submenu = siteMenu.Where(a => a.ReportsTo.Equals(i.EmpID)).Count();}
@if (submenu > 0)
{
<span class="collapse collapsible">&nbsp;</span>
}
else
{
<span style="width:15px; display:inline-block">&nbsp;</span>
}
<span id="category">
<a href="#@{Session["id"][email protected];}" id="name" onclick="">@i.Name</a>
</span>
@if (submenu > 0)
{
<ul>
@Treeview.GetTreeView(siteMenu, i.EmpID)
</ul>
}
</li>
 

Answers (1)