jqGrid - 图标不显示

时间:2015-03-24 00:48:06

标签: jquery jqgrid

我目前有一个正确加载数据并正常运行的jqGrid,但是没有显示图标(分页箭头,最小化箭头,删除和添加图标)。如果我将鼠标悬停在应有的位置,则该区域会突出显示并响应单击。我已经在这个问题上查找了其他主题,但jqGrid的版本我没有提到我见过的人们所引用的目录。

我使用的jqGrid版本是Guriddo_jqGrid_JS_4.7.1

这是我的代码:

<!DOCTYPE HTML>
<html>
<head>
<script src="../jquery-1.11.2.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" media="screen" href="../Guriddo_jqGrid_JS_4.7.1/css/jquery-ui.theme.css"/>
<link rel="stylesheet" type="text/css" media="screen" href="../Guriddo_jqGrid_JS_4.7.1/css/ui.jqgrid.css"/>

<link rel="stylesheet" type="text/css" media="screen" href="../Guriddo_jqGrid_JS_4.7.1/css/jquery-ui-1.8.18.custom.css"/>
<script src="../Guriddo_jqGrid_JS_4.7.1/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="../Guriddo_jqGrid_JS_4.7.1/js/jquery.jqGrid.min.js" type="text/javascript"></script>

<script type="text/javascript">
    $(document).ready(function(){
        $("#list").jqGrid({
            url: "loadform.php",
            datatype: "json",
            colNames: ["Name", "Social Security Number", "Date of Birth", "Income"],
            colModel: [
                       {name: "name"},
                       {name: "ssn", width: 200},
                       {name: "dob"},
                       {name: "income"},
            ],
            rowNum: 10,
            rowList: [5,10,15],
            viewrecords: true,
            sortorder: "desc",
            height: "auto",
            loadonce: true,
            caption: "Assignment 5 - jqGrid",
            pager: "#listpager"
        });      

        $("#list").jqGrid("navGrid", "#listpager",{edit:false,add:true,search:false,refresh:false});
    });
</script>
</head>

<body>
    <center><h1>Data Form With jQuery</h1>
    <table id="list"></table>    
    <div id="listpager"></div>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

请尝试添加position: 'right',如下所示

$("#list").jqGrid("navGrid", "#listpager",{edit:false,add:true,search:false,refresh:false,position: 'right'});