ASP MVC 5使用Leafnode上的复选框创建Treeview

时间:2015-01-21 12:36:43

标签: c# asp.net-mvc-4 razor treeview

这是我想要用来创建树视图的模型结构,在叶节点上有复选框:

public class CategoryEntity : BaseEntity
{
    public CategoryEntity()
        : base()
    {

    }

    private Guid _categoryId;

    public Guid CategoryId
    {
        get { return _categoryId; }
        set { _categoryId = value; InvokePropertyChanged("CategoryId"); IsDirty = true; }
    }

    private string _categoryname;

    public string CategoryName
    {
        get { return _categoryname; }
        set { _categoryname = value; InvokePropertyChanged("CategoryName"); IsDirty = true; }
    }

    private string _categorydescription;

    public string CategoryDescription
    {
        get { return _categorydescription; }
        set { _categorydescription = value; InvokePropertyChanged("CategoryDescription"); IsDirty = true; }
    }

    private string _categorytype;

    public string CategoryType
    {
        get { return _categorytype; }
        set { _categorytype = value; InvokePropertyChanged("CategoryType"); IsDirty = true; }
    }

    private Guid? _parentcategoryId;

    public Guid? ParentCategoryId
    {
        get { return _parentcategoryId; }
        set { _parentcategoryId = value; InvokePropertyChanged("ParentCategoryId"); IsDirty = true; }
    }
}

问题是我是MVC的新手,我不知道用哪种控件在树形结构中显示这些值。任何人都可以提出这样做​​的方法吗?

0 个答案:

没有答案