I was developing in the trial version Q3 2007 and just purchased Q1 2008. I noticed that has been tons of changes between the two and I'm stuck. In the previous version e.NodeClicked was valid but no longer exists in the new version. Could someone point me in the right direction cause I'm lost at this point.
Thanks
protected void RadTreeView1_NodeExpand(object o, RadTreeNodeEventArgs e) |
{ |
// This fires when a + sign is clicked and the tree expands |
switch (e.NodeClicked.Category) |
{ |
case "Category": |
if (PDM.GlobalVariable.NodeID == "CategoryID") |
{ |
AddSubCategoryNodes(e.NodeClicked); |
} |
AddProductNodes(e.NodeClicked); |
break; |
case "Product": |
AddVariantNodes(e.NodeClicked); |
break; |
case "Variant": |
AddSizeNodes(e.NodeClicked); |
break; |
default: |
break; |
} |
} |
private void AddSubCategoryNodes(RadTreeNode parentNode) |
{ |
// Add to tree when SubCategories are present |
DataTable dt = GetCategoryNodeData(int.Parse(parentNode.Value)); |
foreach (DataRow row in dt.Rows) |
{ |
RadTreeNode node = new RadTreeNode(); |
node.Text = (string)row[PDM.GlobalVariable.NodeName]; |
node.Value = ((int)row[PDM.GlobalVariable.NodeID]).ToString(); |
node.CssClass = "Normal"; |
node.HoveredCssClass = "Normal"; |
node.Category = "Category"; |
if (getChildCount("Category", (int)row[PDM.GlobalVariable.NodeID]) > 0) |
{ |
node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack; |
} |
parentNode.Nodes.Add(node); |
} |
} |
private void AddProductNodes(RadTreeNode parentNode) |
{ |
// Add to tree when product is present |
bool Test = false; |
RadTreeNode addNode = new RadTreeNode(); |
DataTable dt = GetProductNodeData(int.Parse(parentNode.Value)); |
foreach (DataRow row in dt.Rows) |
{ |
if (Test == false) |
{ |
addNode.Text = "Add Product"; |
addNode.Value = "0"; |
addNode.Category = "Product"; |
addNode.CssClass = "FirstNode"; |
addNode.HoveredCssClass = "OverNode"; |
addNode.NavigateUrl = "AddProduct.aspx?CategoryID=" + parentNode.Value + "&SystemID=11"; |
addNode.Target = "Radpane8"; |
parentNode.Nodes.Add(addNode); |
Test = true; |
} |
RadTreeNode node = new RadTreeNode(); |
node.Text = (string)row["Name"]; |
node.Value = ((int)row["ProductID"]).ToString(); |
nodeSystem = ((int)row["SystemID"]).ToString(); |
node.Category = "Product"; |
node.NavigateUrl = "Product.aspx?ProductID=" + node.Value + "&SystemID=" + nodeSystem; |
node.Target = "Radpane8"; |
if (getChildCount("Product", (int)row["ProductID"]) > 0) |
{ |
node.ExpandMode = TreeNodeExpandMode.ServerSideCallBack; |
} |
parentNode.Nodes.Add(node); |
} |
} |