This question is locked. New answers and comments are not allowed.
Hello friends,
<%= Html.Telerik().TreeView()
.Name("TreeView")
.HtmlAttributes(new { style = "width: 150px; float: left; margin-bottom: 30px;" })
.BindTo(Model.ObnCategoryTextComponent, mappings =>
{
mappings.For<ObnCategory>(binding => binding
.ItemDataBound((item, category) =>
{
item.Text = category.ObnCategoryName;
})
.Children(category =>category.ObnSubCategoryName));
mappings.For<ObnSubCategory>(binding => binding
.ItemDataBound((item, subCategory) =>
{
item.Text = subCategory.ObnSubCategoryName;
}));
})
%>
Here I have two Table ObnCategory and ObnSubCategory
my plan is to display all ObnCategories in treeveiwe I need to display all SubCategories for that Categories.........But here I am not able to dislay ObnSubCategoryName for Children..
Can anyone help me out..how to display ObnSubCategoryName for each Category..
Here is my ObnCategory table..
has ObnCategoryId
obnCategoryName
ObnSubCategory table has
ObnSubCategoryId
ObnSubCategoryName
ObnCategoryId
So ObnCategoryId is there in ObnSubCategory table..
Please can anyone tell me how to display ObnSubCategoryName in Childeren..
Thanks