使用dynatree的树视图

时间:2014-02-05 05:52:26

标签: ajax dynatree

Hai我在使用dynatree和MVC中的ajax调用时遇到了这个小问题,因为树没有显示它只显示null,null,null为树

我在Controller中的方法(json)

[HttpGet]
    public JsonResult Catalog(string filter) {

        var query = ReaderManager.Instance.GetCatalog(true, null);
        var tree = TreeService.GetNavigationTreeModel(query, c => c.Name, c => c.PublishedCount, c => c.Id);
        return Json(tree, JsonRequestBehavior.AllowGet);



    }

和我的Dynatree

$("#res_catBar").dynatree({
        initAjax: {

            url: '@Url.Action("Catalog")',
            dataType: "json",
            },
            onActivate: function (node) {
            alert("rf");
            $('#responseMessage').text(node.data);
        }

    })

0 个答案:

没有答案