2013-12-09 4 views
0

jqGrid가 내 사이트에서 작동하고 navGrid가 내장되어 있지만 팝업 대신 클릭하면 새 페이지로 이동하는 방법을 알 수 없습니다. 업 페이지. 나는 약간의 검색을했지만 아무것도 찾을 수 없었다. 나의 현재 JS :jqGrid가 새 페이지에 직접 버튼 추가

<script type="text/javascript"> 
$(document).ready(function() 
{ 
    $('#Sections').jqGrid({ 
     url: '/Admin/Section/GridData', 
     datatype: 'json', 
     mtype: 'GET', 
     colNames: ['ID', 'RouteName', 'Title'], 
     colModel: [ 
        { name: 'ID', index: 'ID', align: 'left' }, 
        { name: 'RouteName', index: 'RouteName', align: 'left' }, 
        { name: 'Title', index: 'Title', align: 'left' } 
     ], 
     pager: $('#SectionsPager'), 
     rowNum: 10, 
     sortname: 'ID', 
     sortorder: 'asc', 
     viewrecords: true 
    }).navGrid(
     '#SectionsPager', 
     //enabling buttons 
     { add: true, del: false, edit: false, search: false }, 
     //edit options 
     { width: 'auto' }, 
     //add options 
     { width: 'auto', url: '/Admin/Section/Add' }, 
     //delete options 
     {}); 
}); 

답변

-1

(사용자 추가 버튼 ID를 가정하는 것은 "add_list"입니다)이 시도 기본을 수정할 수있는 jqGrid의 창조자 당

$("#add_list").click(function() { 
    document.location = "http://google.com"; 
}); 
+0

추가 버튼을 만들지는 않습니다. jqGrid는 .navGrid 함수의 일부로이를 생성합니다. – Matthew

관련 문제