suman goud

suman goud

  • NA
  • 176
  • 53.8k

How to change color of tree node for particular node

Jul 20 2016 3:40 AM
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)