This question is locked. New answers and comments are not allowed.
hello, everybody.
my database have 3 tables - store, category, items.
so i want to implement treeview to show them.
that is, when clicking root node, it will show(expand) child nodes for store.
and when clicking properly store item, it will show child nodes for category which has store_id fk, ...
----------------------------------------
Root
-store1
-category1
-item1
-item2
-category2
........
-------------------------------------------
how can i implement for this treeview? i want to use client ajax databinding for this treeview.
my some source code is following...
<%= Html.Telerik().TreeView()
.Name("TreeView")
.BindTo(Model, (item, store) =>
{
item.Text = store.name;
item.Value = store.Id.ToString();
item.LoadOnDemand = store.category.Count > 0;
})
.DataBinding(dataBinding => dataBinding
.Ajax().Select("_AjaxCategoryLoading", "MultiStore")
)
%>
----controller----
public ActionResult _AjaxCategoryLoading(TreeViewItem node)
{
......
}
public ActionResult _AjaxItemLoading(TreeViewItem node)
{
......
}
----------
at this point, when clicking category item, i cant access _AjaxItemLoading action.
can you show me how to implement this treeview?
any suggestion is welcome.
best regards.
scott
my database have 3 tables - store, category, items.
so i want to implement treeview to show them.
that is, when clicking root node, it will show(expand) child nodes for store.
and when clicking properly store item, it will show child nodes for category which has store_id fk, ...
----------------------------------------
Root
-store1
-category1
-item1
-item2
-category2
........
-------------------------------------------
how can i implement for this treeview? i want to use client ajax databinding for this treeview.
my some source code is following...
<%= Html.Telerik().TreeView()
.Name("TreeView")
.BindTo(Model, (item, store) =>
{
item.Text = store.name;
item.Value = store.Id.ToString();
item.LoadOnDemand = store.category.Count > 0;
})
.DataBinding(dataBinding => dataBinding
.Ajax().Select("_AjaxCategoryLoading", "MultiStore")
)
%>
----controller----
public ActionResult _AjaxCategoryLoading(TreeViewItem node)
{
......
}
public ActionResult _AjaxItemLoading(TreeViewItem node)
{
......
}
----------
at this point, when clicking category item, i cant access _AjaxItemLoading action.
can you show me how to implement this treeview?
any suggestion is welcome.
best regards.
scott