0

jqGrid の URL メソッドに追加のパラメーターを 1 つまたは 2 つ送信する必要があります。それを行う方法はありますか?

    $(document).ready(function () {
        jQuery("#frTable").jqGrid ({
            cmTemplate: { sortable: false },
            caption: '@TempData["POPNAME"]' + ' Population',
            url: '/Encounters/GetAjaxPagedGridData/'+ @TempData["POPULATIONID"]+'',
            ...

これは私が打とうとしている方法です...

    public string GetAjaxPagedGridData(int page, int rows, int popId) {
        return "";
    }

こんなことを考えていた

url: '@Url.Action("GetAjaxPagedGridData", "Encounters", new { popId = TempData["POPULATIONID"] })'
4

1 に答える 1

0

たとえば、ポストデータオプションを使用して、次のことを行います。

 $(document).ready(function () {
    jQuery("#frTable").jqGrid ({
        cmTemplate: { sortable: false },
        caption: '@TempData["POPNAME"]' + ' Population',
        url: '/Encounters/GetAjaxPagedGridData/',
        postdata: {popId : TempData["POPULATIONID"],
                   // and any other parameters that you need to pass}
于 2013-02-26T18:11:31.023 に答える