【问题标题】:Binding jqxGrid with deep json output将 jqxGrid 与深度 json 输出绑定
【发布时间】:2014-03-03 06:59:48
【问题描述】:
    <script type="text/javascript">
        $(document).ready(function () {

            var data1=[{"Employees": {"Employee": [{ "EmpID": "Beverly  Hills","EmpSubject": 90210},{ "EmpID": "Beverly Hills1","EmpSubject": 90210333}]}}];

            var source =
            {
                datatype: "json",
                  datafields: [
                    {name: 'subject', map: 'Employees>Employee>EmpSubject'},
                    {name: 'empid', map: 'Employees>Employee>EmpID'}

                ],
               localdata:data1
            };
            var dataAdapter = new $.jqx.dataAdapter(source, {
                downloadComplete: function (data, status, xhr) { },
                loadComplete: function (data) { },
                loadError: function (xhr, status, error) { }
            });
            $("#jqxgrid").jqxGrid(
            {
                width: 1435,
                source: dataAdapter,
                pageable: true,
                autoheight: true,
                sortable: true,
                altrows: true,
                enabletooltips: true,
                editable: true,
                selectionmode: 'multiplecellsadvanced',
                columns: [

                 { text: 'Subject', datafield: 'subject'},
                 { text: 'ID', datafield: 'empid'}


                ],

            });
        });
    </script>

这里我想显示两个员工的详细信息(即两行)。但是 jqxgrid 不是>显示记录。请在这方面提供帮助。

最好的问候 巴拉

【问题讨论】:

    标签: jqxgrid


    【解决方案1】:

    【讨论】:

    • 好的。谢谢。我会试试的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-08
    • 2013-05-15
    • 2011-05-12
    • 2017-02-12
    • 2017-12-24
    相关资源
    最近更新 更多