Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 将JSonArray绑定到JQGrid_Asp.net Mvc_Json_Jqgrid - Fatal编程技术网

Asp.net mvc 将JSonArray绑定到JQGrid

Asp.net mvc 将JSonArray绑定到JQGrid,asp.net-mvc,json,jqgrid,Asp.net Mvc,Json,Jqgrid,我不熟悉Jquery和JSon,并尝试将JSon数组结果绑定到JQGrid 我可以在Controller中看到JSON结果,但在视图中看不到绑定 请帮我查一下密码。可能视图中的函数中缺少了我 这是单击按钮加载结果时引发的函数 function LoadOrganisationGrid() { var predifnedValue = $("#cmdOrgList").val(); jQuery("#gridOrganisation").jqGrid({

我不熟悉Jquery和JSon,并尝试将JSon数组结果绑定到JQGrid

我可以在Controller中看到JSON结果,但在视图中看不到绑定

请帮我查一下密码。可能视图中的函数中缺少了我

这是单击按钮加载结果时引发的函数

function LoadOrganisationGrid() {

        var predifnedValue = $("#cmdOrgList").val();

        jQuery("#gridOrganisation").jqGrid({
            url: 'Home/GetOrganisationGridResults?predefinedMatchID=' + predifnedValue,
            datatype: "json",
            mtype: 'GET',
            width: 1030,
            height: 275,
            colNames: ['Org_MID', 'P_MID', 'Candidate_Detail', 'CompanyName', 'StreetAddress', 'City', 'PostCode', 'Country', 'EmailDomain', 'VATNo', 'IsLinked', 'NotLinked'],
            colModel: [
                { name: 'Org_MatchCandidateID', index: 'Org_MatchCandidateID', width: 60 },
                { name: 'PredefinedMatchID', index: 'PredefinedMatchID', width: 50 },
                { name: 'Candidate_Detail', index: 'Candidate_Detail', width: 150 },
                { name: 'CompanyName', index: 'CompanyName', width: 100, align: "right" },
                { name: 'StreetAddress', index: 'StreetAddress', width: 150, align: "right" },
                { name: 'City', index: 'City', width: 50, align: "right" },
                { name: 'PostCode', index: 'PostCode', width: 80, sortable: false },
                { name: 'Country', index: 'Country', width: 60, sortable: false },
                { name: 'EmailDomain', index: 'EmailDomain', width: 100, sortable: false },
                { name: 'VATNo', index: 'VATNo', width: 50, sortable: false },
                { name: 'Count_IsLinked', index: 'Count_IsLinked', width: 90, sortable: false },
                { name: 'Count_NotLinked', index: 'Count_NotLinked', width: 90, sortable: false }
            ],

            rowNum: 10,
            rowList: [10, 20, 30],
            pager: '#pager5',
            sortname: 'id',
            viewrecords: true,
            sortorder: "desc",
            caption: "Organisations Data"


        }).navGrid("#pager5", { edit: false, add: false, del: false });
    }
下面是控制器代码

public JsonResult GetOrganisationGridResults(int predefinedMatchID)
    {
        var result = new SearchTypeModel
        {
            ListOrganisationType = GetOrgansiationList(SearchTypeService.GetOrganisationType(predefinedMatchID))
        };

        return Json(result, JsonRequestBehavior.AllowGet);
    }
<table id="gridOrganisation" ></table>
      <div id="pager5"></div>
查看下面的代码

public JsonResult GetOrganisationGridResults(int predefinedMatchID)
    {
        var result = new SearchTypeModel
        {
            ListOrganisationType = GetOrgansiationList(SearchTypeService.GetOrganisationType(predefinedMatchID))
        };

        return Json(result, JsonRequestBehavior.AllowGet);
    }
<table id="gridOrganisation" ></table>
      <div id="pager5"></div>

请任何人在回家检查前都能看到我的疑问。url:'/Home/GetOrganizationGridResults?预定义的MatchId='+predifnedValue,