Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/282.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
C# MVC4 jqGrid寻呼机不显示图标_C#_Jquery_Asp.net Mvc_Asp.net Mvc 4_Jqgrid - Fatal编程技术网

C# MVC4 jqGrid寻呼机不显示图标

C# MVC4 jqGrid寻呼机不显示图标,c#,jquery,asp.net-mvc,asp.net-mvc-4,jqgrid,C#,Jquery,Asp.net Mvc,Asp.net Mvc 4,Jqgrid,我在MVC4应用程序中使用jQGrid。除了图标没有显示在寻呼机上外,所有功能都正常。我需要帮助才能知道出了什么问题 这是我的密码: <link href="@Url.Content("~/Content/themes/jquery-ui.css")" rel="stylesheet" media="screen"> <link href="@Url.Content("~/Content/jquery.jqGrid/ui.jqgrid.css")" rel="styleshee

我在MVC4应用程序中使用jQGrid。除了图标没有显示在寻呼机上外,所有功能都正常。我需要帮助才能知道出了什么问题

这是我的密码:

<link href="@Url.Content("~/Content/themes/jquery-ui.css")" rel="stylesheet" media="screen">
<link href="@Url.Content("~/Content/jquery.jqGrid/ui.jqgrid.css")" rel="stylesheet" media="screen">
<link href="@Url.Content("~/Content/jquery.jqGrid/ui.multiselect.css")" rel="stylesheet" media="screen">

<script src="js/i18n/grid.locale-en.js" type="text/javascript"></script>

<script src="@Url.Content("~/Scripts/i18n/grid.locale-pt.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.jqGrid.min.js")"></script>
<script src="@Url.Content("~/Scripts/ui.multiselect.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.tablednd.js")"></script>
<script src="@Url.Content("~/Scripts/jquery.contextmenu.js")"></script>

<script type="text/javascript">

    jQuery(document).ready(function () {
        $('#myGrid').jqGrid({
            height: 300,
            toolbar: [true, 'bottom'],
            multiselect: true,
            cellEdit: false,
            rowNumbers: true,
            datatype: 'json',
            rowNum: 50,
            rowList: [50, 100, 200],
            url: '@Url.Action("GetGridData", "AdminSysLog")',
            editurl: '@Url.Action("CRUDGridData", "AdminSysLog")',
            contentType: "application/json; charset-utf-8",
            caption: 'System Logs',
            mtype: 'POST',
            shrinkToFit: false,
            pager: '#myPager',
            sortname: 'DateTime',
            sortorder: 'desc',
            viewrecords: true,
            colNames: ['DATETIME', 'LEVEL', 'TYPE', 'SYSTEM', 'USER', 'MESSAGE'],
            colModel: [
                            { name: 'DateTime', align: 'center', width: 140, sortable: true, editable: false, searchoptions: { sopt: ['eq', 'ne', 'cn'] } },
                            { name: 'Severity', align: 'center', width: 50, sortable: true, editable: false, searchoptions: { sopt: ['eq', 'ne', 'cn'] } },
                            { name: 'Type', align: 'center', width: 50, sortable: true, editable: false, searchoptions: { sopt: ['eq', 'ne', 'cn'] } },
                            { name: 'Source', align: 'center', width: 100, sortable: true, editable: false, searchoptions: { sopt: ['eq', 'ne', 'cn'] } },
                            { name: 'User', align: 'center', width: 100, sortable: true, editable: false, searchoptions: { sopt: ['eq', 'ne', 'cn'] } },
                            { name: 'Message', align: 'left', width: 500, sortable: true, editable: false, searchoptions: { sopt: ['eq', 'ne', 'cn'] } },
            ]
        }).navGrid('#myPager', {
            edit: false,
            add: false,
            del: true,
            search: true,
            deltext: "Apaga",
            searchtext: "Busca",
            viewrecords: true
        }
        );
    });


</script>


<table id="myGrid"></table>
<div id="myPager"></div>

<br />
<br />

jQuery(文档).ready(函数(){
$('#myGrid').jqGrid({
身高:300,
工具栏:[true,'bottom'],
多选:对,
cellEdit:错,
行数:对,
数据类型:“json”,
rowNum:50,
行列表:[50100200],
url:'@url.Action(“GetGridData”、“AdminSysLog”),
editurl:'@Url.Action(“CRUDGridData”、“AdminSysLog”),
contentType:“application/json;charset-utf-8”,
标题:“系统日志”,
mtype:“POST”,
shrinkToFit:错,
寻呼机:“#我的寻呼机”,
sortname:'DateTime',
排序器:“desc”,
viewrecords:是的,
colname:['DATETIME','LEVEL','TYPE','SYSTEM','USER','MESSAGE'],
colModel:[
{name:'DateTime',align:'center',width:140,sortable:true,editable:false,searchoptions:{sopt:['eq',ne',cn']},
{name:'Severity',align:'center',width:50,sortable:true,editable:false,searchoptions:{sopt:['eq',ne',cn']},
{name:'Type',align:'center',width:50,sortable:true,editable:false,searchoptions:{sopt:['eq',ne',cn']},
{name:'Source',align:'center',width:100,sortable:true,editable:false,searchoptions:{sopt:['eq',ne',cn']},
{name:'User',align:'center',width:100,sortable:true,editable:false,searchoptions:{sopt:['eq',ne',cn']},
{name:'Message',align:'left',width:500,sortable:true,editable:false,searchoptions:{sopt:['eq',ne',cn']},
]
}).navGrid(“#myPager”{
编辑:false,
加:错,,
戴尔:是的,
搜索:对,
deltext:“阿帕加”,
搜索文本:“布斯卡”,
viewrecords:正确
}
);
});


下面是显示的内容(根本没有图标):


感谢您的帮助。

我想您在项目中添加jQuery UI的方式是错误的。您应该验证文件夹
/Content/themes/
(您从中获得
jquery ui.css
)是否包含带有PNG文件的子文件夹
图像。

我想您在项目中添加jquery ui的方式是错误的。您应该验证文件夹
/Content/themes/
(您从中获得
jquery ui.css
)是否包含带有PNG文件的子文件夹
图像。

对我来说是一个非常头疼的问题,要解决这个问题,请首先查看网格寻呼机jquery的演示工作,如:

,在firefox中,我点击“inspect element”(在按钮中),然后在url图像中搜索文件,然后将文件复制到我的机器中;然后在我的项目中,我点击了“查看背景图像”(按钮);这就是我要找的正确名字。如果需要重命名,请将该图像放入:..\Styles\images\

这就是解决办法


“Omar Romero,Mexico City”

对我来说真是一件头疼的事,要解决这个问题,首先请看一个网格寻呼机的Jquery演示,如:

,在firefox中,我点击“inspect element”(在按钮中),然后在url图像中搜索文件,然后将文件复制到我的机器中;然后在我的项目中,我点击了“查看背景图像”(按钮);这就是我要找的正确名字。如果需要重命名,请将该图像放入:..\Styles\images\

这就是解决办法


“Omar Romero,墨西哥城”

Content/themes包含文件夹“Content/themes/base/images”和许多jquery.ui.*文件(accordio、all、autocomplete、…、ui.tabs、ui.theme和jquery ui)。我遗漏了什么吗?@Mendez:如果你打开
jqueryui.css
,你会看到相对路径,比如
url(images/ui-bg\u inset-hard\u 100\u fcfdfd\u 1x100.png)
。这意味着它必须存在于相对于
jqueryui.css
位置的
images
目录中。如果使用
~/Content/themes/jquery ui.css
ui-bg\u inset-hard\u 100\u fcfdfd\u 1x100.png
必须存在于
~/Content/themes/images
目录中。Content/themes包含文件夹“Content/themes/base/images”和大量jquery.ui.*文件(手风琴,全部,自动完成,…,ui.tabs,ui.theme和jquery ui)。我遗漏了什么吗?@Mendez:如果你打开
jquery ui.css
你会看到相对路径,比如
url(image/ui-bg\u inset-hard\u 100\u fcfdfd\u 1x100.png)
。这意味着它必须存在于相对于
jquery ui.css
位置的
images
目录中。如果使用
~/Content/themes/jquery ui.css
ui-bg\u inset-hard\u 100\u fcfdfd\u 1x100。上述示例中的png
必须存在于
~/Content/themes/images>目录中。