Hi ,
the data model structure the following :
I use Html.Kendo().TreeView().DataSource() , but treeview can't render subitem ,
how could I fix or use other method ?
the data model structure the following :
public
class
TreeMainItem
{
private
IList<TreeSubItem> _SubItems;
private
bool
_hasChildren =
true
;
public
TreeMainItem()
{
_SubItems =
new
List<TreeSubItem>();
}
public
int
ItemIndex {
get
;
set
; }
public
string
Title {
get
;
set
; }
public
string
CssClass {
get
;
set
; }
public
string
TargetUrl {
get
;
set
; }
public
string
IconUrl {
get
;
set
; }
public
bool
hasChildren
{
get
{
return
this
._hasChildren; }
set
{
this
._hasChildren = value; }
}
public
IList<TreeSubItem> SubItems
{
get
{
return
this
._SubItems; }
set
{
this
._SubItems = value; }
}
}
public
class
TreeSubItem
{
private
bool
_hasChildren =
false
;
public
int
ItemIndex {
get
;
set
; }
public
string
Title {
get
;
set
; }
public
string
CssClass {
get
;
set
; }
public
string
TargetUrl {
get
;
set
; }
public
string
IconUrl {
get
;
set
; }
public
bool
hasChildren
{
get
{
return
this
._hasChildren; }
set
{
this
._hasChildren = value; }
}
}
I use Html.Kendo().TreeView().DataSource() , but treeview can't render subitem ,
how could I fix or use other method ?