Hi,
Is there a way I can keep the text of a Parent node but remove the link? The treeview parent node is used just as a header, no navigation.Any help would be great.Thanks.
private void BindNodes(string PtID)
{
if (PtID != "")
{
int PatientID = Convert.ToInt32(PtID);
DBConnection dbObj = new DBConnection();
if (Session["Activepatient"] != null)
{
string[] SubChild = new string[4];
SubChild[0] = "Demographics";
SubChild[1] = "Medication Reviews";
SubChild[2] = "Drug Testing & Monitoring";
SubChild[3] = "Other Program";
TreeNode oTrParent = new TreeNode();
//trv_patient.ParentNodeStyle = "None";
//oTrParent.SelectAction.Style.Add("display", "none");
TreeNode oTrSubChild1;
TreeNode oTrSubChild;
for (int i = 0; i < 4; i++)
{
oTrSubChild1 = new TreeNode();
oTrSubChild1.Text = SubChild[i];
if (i == 1)
{
PatientInfoCollection patientCollection = new PatientInfoCollection();
patientCollection = dbObj.GetMedicationReviews(PatientID);
foreach (PatientInfo au in patientCollection)
{
oTrSubChild = new TreeNode();
PatientInfo Patient = new PatientInfo();
oTrSubChild.Text = au.DateRcvd.Value.ToString("MM-dd-yyyy")
oTrSubChild.Target = au.ReviewId.ToString();
oTrSubChild1.ChildNodes.Add(oTrSubChild);
}
oTrSubChild = new TreeNode();
oTrSubChild.Text = "Add Medication Review";
oTrSubChild.Target = "New";
oTrSubChild1.ChildNodes.Add(oTrSubChild);
}
trv_patient.Nodes.Add(oTrSubChild1);
}
}
}
}