I've been struggle to solve this problem in within one day but still unable to get rid on it. I've attached along picture to clarify on this problem to what I need. I've define a border to entire text area of nodes and those server control nodestyle seems to be only apply everythings inside the nodes area but not outside where you've to define your own ways.
Markup View:
CollapseImageUrl="~/App_Themes/PPHPG/Images/minus.png" OnTreeNodePopulate="ProductLineView_TreeNodePopulate">
Code Behind:
JavaScript
var PreviousJobNumber = String.Empty;
var NodeCount = 0;
dynamic ActiveNode = null;
dynamic StepCount = null;
var JobDescription = String.Empty;
this.ProductLineView.Nodes.Clear();
foreach(var item in query)
{
dynamic SectionId = null;
TreeNode DetailNode;
if (PreviousJobNumber != item.ps_no)
{
PreviousJobNumber = item.ps_no;
SectionId = item.Id.ToString();
Int32 SectionValue = Convert.ToInt32(SectionId);
JobDescription = timesheet.SectionGroups.Where(p => p.Id == SectionValue).Select(p => p.StockDescription).SingleOrDefault();
TreeNode HeaderNode = new TreeNode();
HeaderNode.Text = item.ps_no + " " + "Receive Quantity" + " " + "Target Quantity" + " " + "Access";
TreeNode DescriptionNode = new TreeNode();
DescriptionNode.Text = JobDescription;
DescriptionNode.Value = "Desc"; HeaderNode.ChildNodes.Add(DescriptionNode);
StepCount = 1;
DetailNode = new TreeNode();
DetailNode.Text = "(Step " + StepCount + ") " + SectionId;
DetailNode.Value = SectionId;
HeaderNode.ChildNodes.Add(DetailNode);
this.ProductLineView.Nodes.Add(HeaderNode);
ActiveNode = NodeCount;
NodeCount += 1;
}
else
{
StepCount += 1;
SectionId = item.Id.ToString();
DetailNode = new TreeNode();
DetailNode.Text = "(Step " + StepCount + ") " + SectionId;
DetailNode.Value = SectionId;
this.ProductLineView.Nodes[ActiveNode]
.ChildNodes.Add(DetailNode);
}
this.ProductLineView.ExpandAll();
}
}Thanks to anyone could help.
Nik Varma2 pointsPosted Sep 21, 2016, 7:41 AM EDT