Hi,
I have a tree view bound from the database, so that by clicking on a node I can found the text and corresponding data value field.
protected void GenerateCompanyTree()
{
DataTable DtCompany;
JOMCMiddleWare.BL.CompanyStructure oCompanyStructure = new JOMCMiddleWare.BL.CompanyStructure();
oCompanyStructure._Module_Id = oCompanyStructure._Module_Id;
oCompanyStructure._Language_Id = Convert.ToInt32(Session[JOMCSession.__Session_Lanuage_Id]);
oCompanyStructure._Company_Id = Convert.ToInt32(Session[JOMCSession.__Session_Company_Id]);
DtCompany = oCompanyStructure.GetDataAllTreeViewCompanyStructure();
if (DtCompany.Rows.Count > 0)
{
RadTreeViewCompany.DataSource = DtCompany;
RadTreeViewCompany.DataTextField = "Module_Content_Text";
RadTreeViewCompany.DataFieldID = "Company_Id";
RadTreeViewCompany.DataFieldParentID = "Company_Parent_Id";
RadTreeViewCompany.DataValueField = "Company_Id";
RadTreeViewCompany.DataBind();
RadTreeViewCompany.ExpandAllNodes();
}
}
Now, I have the requirement that I have to enable only those nodes at the bottom (leaf level) only.
Any idea, how to achieve this?
Thanks
I have a tree view bound from the database, so that by clicking on a node I can found the text and corresponding data value field.
protected void GenerateCompanyTree()
{
DataTable DtCompany;
JOMCMiddleWare.BL.CompanyStructure oCompanyStructure = new JOMCMiddleWare.BL.CompanyStructure();
oCompanyStructure._Module_Id = oCompanyStructure._Module_Id;
oCompanyStructure._Language_Id = Convert.ToInt32(Session[JOMCSession.__Session_Lanuage_Id]);
oCompanyStructure._Company_Id = Convert.ToInt32(Session[JOMCSession.__Session_Company_Id]);
DtCompany = oCompanyStructure.GetDataAllTreeViewCompanyStructure();
if (DtCompany.Rows.Count > 0)
{
RadTreeViewCompany.DataSource = DtCompany;
RadTreeViewCompany.DataTextField = "Module_Content_Text";
RadTreeViewCompany.DataFieldID = "Company_Id";
RadTreeViewCompany.DataFieldParentID = "Company_Parent_Id";
RadTreeViewCompany.DataValueField = "Company_Id";
RadTreeViewCompany.DataBind();
RadTreeViewCompany.ExpandAllNodes();
}
}
Now, I have the requirement that I have to enable only those nodes at the bottom (leaf level) only.
Any idea, how to achieve this?
Thanks