내가이 일을 분류 할 수 있다고 생각했지만 다른 응용 프로그램에서 jqGrid를 사용하려고 시도했지만 작동하지 않으려 고합니다. 언급 된 URL로 이동하지도 않습니다. 비어있는 그리드 만 빈 레코드 문자열을 표시하지 않습니다.
'이것은 내가보기jqGrid with ASP.NET MVC3 다시?
$("#list").jqGrid({
url: '/Customers/MyAccount/GetEnhancementRequests',
datatype: 'json',
type: 'POST',
colNames: ['ID', 'Requested By', 'Requested Date', 'Details', 'Progress'],
colModel: [
{ name: 'Id', index: 'ID', key: true, width: 55 },
{ name: 'CustomerName', index: 'CustomerName', width: 50 },
{ name: 'requestDate', index: 'requestDate', width: 50 },
{ name: 'details', index: 'details', width: 50 },
{ name: 'progress', index: 'progress', width: 50 }
],
pager: $("#pager"),
rowNum: 2,
rowList: [2, 10, 50, 100, 200],
sortname: 'ID',
viewrecords: true,
sortorder: 'desc',
caption: 'Enhancement Requests',
imgpath: '/Content/images',
width: 1000,
height: 500,
emptyrecords: 'No enhancements have been submitted',
jsonReader: { repeatitems: false }
});
$("#list").jqGrid('navGrid', '#pager',
{ edit: false, add: false, del: false },
{},
{},
{},
{ multipleSearch: true, multipleGroup: true }
);
에있는 그리고 난 그냥 컨트롤러 액션에 중단 점을 가지고이
[HttpPost]
public JsonResult GetEnhancementRequests(string sidx, string sord, int page, int rows, bool _search, string filters)
{
var jsonData = new
{
total = 1,
page = page,
records = 1,
rows = (
new {
id = 1,
cell = new string[]{
"1", "RequestedBy", DateTime.Now.ToShortDateString(), "Lots of details", "and even some progress"}
})
};
return Json(jsonData);
}
로 내 컨트롤러 액션을 변경 한 것입니다,하지만 외설 그 방법으로 들어가기조차하지 않아. 어떤 통찰력?
편집 : 추가를 잊어 버렸습니다. 다음 스크립트 참조가 있습니다. 당신이 볼 수 있듯이, 나는 모든 REQ 파일
있어<link href="../../../../Scripts/css/custom-theme/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
<link href="../../../../Scripts/css/ui.jqgrid.css" rel="stylesheet" type="text/css" />
<link href="../../../../Scripts/ui.multiselect.css" rel="stylesheet" type="text/css" />
<script src="../../../../Scripts/jquery-1.6.4.min.js" type="text/javascript"></script>
<script src="../../../../Scripts/jquery-ui-1.8.15.min.js" type="text/javascript"></script>
<script src="../../../../Scripts/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>
<script src="../../../../Scripts/grid.locale-en.js" type="text/javascript"></script>
<script src="../../../../Scripts/ui.multiselect.js" type="text/javascript"></script>
<script src="../../../../Scripts/jquery.jqGrid.min.js" type="text/javascript"></script>
<script src="../../../../Scripts/jquery.tablednd.js" type="text/javascript"></script>
그리드가 요청하는 URL의 샘플 출력도 게시 할 수 있습니까? –