0

我有一个 visualforce 页面,我正在使用 jqgrid 在此页面上显示数据。jqgrid 指向的 url 是一个仅输出 JSON 数据的 visualforce 页面 ( https://test.visual.force.com/apex/GridResults )。此页面没有任何标题或 html 信息。

问题是,当我运行此页面时,网格呈现列名但没有数据。当我运行 url 时,它会输出 JSON 数据。我已经粘贴在代码下面。

   jQuery("#list").jqGrid({
        url:"https://test.visual.force.com/apex/GridResults",
        datatype: "json",
        colNames: [{!fieldNames}], -- property in controller  which outputs fieldnames 
        colModel: [{!colModel}], -- property in controller which outputs column definition
        rowNum: 10,
        rowTotal:10,
        rowList: [20, 40, 60],
        loadonce:true,
        mtype:"GET",
        gridView:true,
        pager: '#pager',
        sortname: 'Record ID',
        sortorder: "desc",
        width: 1200,
        height: 400,
        caption: "Accounts"
    });  
    jQuery("#list").jqGrid('navGrid', "#pager", { edit: true, add: true, del: false })
    };

关于为什么页面中的数据不被 jqgrid 消耗的任何想法?非常感谢帮助。

4

1 回答 1

0

您是否研究过 Visualforce 远程处理?

于 2012-04-30T15:25:39.347 回答