当我在Windows XP - 32上运行以下代码时,我得到以下结果.
我只插了一个usb笔式驱动器
On Windows XP - 32 Bit
-----------------------
Drive C:
ProductId: ST3160215AS
ProductRevision: 3.AAD
DeviceType: 7, DeviceNumber: 0, PartitionNumber: 1
DevicePath: \\?\ide#diskst3160215as_____________________________3.aad___#5&2
7db0ed4&0&0.0.0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
Class: DiskDrive
Hardware ID: IDE\DiskST3160215AS_____________________________3.AAD___
Friendly Name: ST3160215AS
Physical Device Object Name: \Device\Ide\IdeDeviceP2T0L0-5
Device Description: Disk drive
Parent Device Instance ID: PCIIDE\IDECHANNEL\4&1C1E8A11&0&0
Parent of Parent Device Instance ID: PCI\VEN_8086&DEV_27C0&SUBSYS_72671462&R
EV_01\3&11583659&0&FA
DeviceInstanceId: IDE\DISKST3160215AS_____________________________3.AAD___\5
&27DB0ED4&0&0.0.0
Drive D:
ProductId: ST3160215AS
ProductRevision: 3.AAD
DeviceType: 7, DeviceNumber: 0, PartitionNumber: 2
DevicePath: \\?\ide#diskst3160215as_____________________________3.aad___#5&2
7db0ed4&0&0.0.0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}
Class: DiskDrive
Hardware ID: IDE\DiskST3160215AS_____________________________3.AAD___ …Run Code Online (Sandbox Code Playgroud) 我无法理解jqGrid的JSON数据源中的所有字段意味着什么,我在任何地方都没有看到任何文档.
我试图理解的例子是:http://www.trirand.com/blog/jqgrid/jqgrid.html然后是"JSON数据"下的第一个例子
可以在此处访问JSON数据:http://www.trirand.com/blog/jqgrid/server.php? q = 2 &rows = 10&page = 2
令我迷失在JSON中的一件事就是这个snipplet:
"userdata":{"amount":1520,"tax":202,"total":1724,"name":"Totals:"}
Run Code Online (Sandbox Code Playgroud)
这究竟是做什么的?
大家好!
所以我现在已经在我的应用程序中使用了JQGrid,并且在我开始优化之前,网格的速度并没有真正困扰我.
如果发现即使我有一个小网格(每页20个项目),悬停突出显示速度很慢,如果网格恰好需要页面上的滚动条,则页面的滚动速度非常慢.
我尝试了异步帖子和loadonce:true,它们的绘制速度都很慢.
我正在使用jquery.ui.theme css.
我已经一起删除了分页,因此网格绝对只包含屏幕上的20个项目,而且悬停的绘图仍然很慢.
为了确保它在我的页面上没有其他任何东西我将网格的显示设置为无,并且页面像往常一样快速运行 - 就像我怀疑的那样.
使用IE8调试器,我使用分析器来测量我的javascript和html的速度,这些速度非常快 - 所以它绝对是屏幕上网格的绘制.
我很感激任何和所有帮助或建议,以提高性能.
我会附上我的网格定义(它非常大),万一你认为它可能是那里的东西:
$("#tblVariables").jqGrid({
url: '/StudyAdmin/GetVariable.aspx?FilterType=' + Filter + '&SelectedFolder=' + SelectedFolder + '&SelectedGroup=' + SelectedGroup,
datatype: "json",
mtype: "POST",
colNames: ['Variable Name', 'Hidden Original Text', 'Original Text', 'Label', 'Hidden', 'Groups', 'HiddenGroups'],
colModel: [
{ name: 'VarName', index: 'VarName', editable: false },
{ name: 'VarOriginalText', index: 'VarOriginalText', hidden: true, editable: true, editrules: { edithidden: true} },
{ name: 'VarOriginalTextToShow', index: 'VarOriginalTextToShow', editable: false, sortable: …Run Code Online (Sandbox Code Playgroud) 尝试如下
jqGrid({
datatype: 'json',
colNames: ["<input type='checkbox' name = 'chkAllOutputField'/>", "other columns" ]
Run Code Online (Sandbox Code Playgroud)
复选框显示在标题上,但无论您如何点击它都不会被选中/取消选中.
如何通过单击选中/取消选中它
我遇到了Jqgrid的问题,我在一个页面上有两个网格,并且在第一个网格的一行上点击需要重新加载第二个网格.
我100%确定第二个网格配置正确,如果我手动传递一个硬编码的ID它正确填充.
只是重装功能不起作用.请有人帮忙.下面是两个网格的jquery代码
$(document).ready(function() {
jQuery("#list2").jqGrid({
url:'classes/ListServices.php',
datatype: "json",
mtype: 'POST',
colNames: ['Id','Description', 'Details', 'Cost in (R)'],
colModel: [
{name:'Id',index:'Id', align:"center", width:30},
{name:'Description',index:'Description', align:"center"},
{name:'Details',index:'Details', align:"left"},
{name:'Cost',index:'Cost',align:"center",width:30,formatter:'currency'},
],
width: 780,
height: 100,
rowNum:18,
pager: '#pager1',
loadonce: true,
sortname: 'id',
viewrecords: true,
sortorder: "asc",
caption:"Services List",
multiselect: false,
onSelectRow: function(ids) {
if(ids == null) {
ids=0;
if(jQuery("#list3").jqGrid('getGridParam','records') >0 ) {
jQuery("#list3").jqGrid('setGridParam',
{url:"subgrid.php?q=1&id="+ids,page:1});
jQuery("#list3").jqGrid.trigger('reloadGrid');
}
}
else {
jQuery("#list3").jqGrid('setGridParam',
{url:"subgrid.php?q=1&id="+ids,page:1});
jQuery("#list3").jqGrid.trigger('reloadGrid');
}
}
});
jQuery("#list2").jqGrid('navGrid','#pager2',
{edit:false,add:false,del:false,multipleSearch:true});
jQuery("#list2").jqGrid('filterToolbar',
{stringResult: true,searchOnEnter : false});
jQuery("#list3").jqGrid({ …Run Code Online (Sandbox Code Playgroud) 如何控制选择输入类型的宽度?这是我的代码:
{name:'code',index:'code', width:60, sorttype:"int" ,
editable:true, edittype:"select",editoptions: {value:"1:11;2:22"}
Run Code Online (Sandbox Code Playgroud)
提前致谢。
我在网格中有一个带有EditActionsIconsColumn的jqgrid,但我试图抓住Edit,Del和Submit上的click事件.谢谢
当我运行这段代码时:
void main(){
int a = 5;
static int i = a+5;
printf("%d", i);
}
Run Code Online (Sandbox Code Playgroud)
我得到错误:初始化元素不是常量
这是什么意思?
在我的ASP.NET MVC 3应用程序中,我在jqGrid上启用了寻呼机,如下图所示:

页面的文本框(图像中心的数字为1)的范围非常广泛 - 比它需要的宽.有谁知道如何调整这个盒子的大小?
当我的网格比这个网格更窄时,这尤其是一个问题,此时页面的文本框推动(或放置)太远到左边并最终挤压按钮,如下图所示:

在这里,"页面"(上一页,第一页)左侧的两个按钮位于"编辑"标签下,该标签是我的自定义编辑按钮的一部分.请注意,页面框仍然很宽.此外,右侧的"视图1-10 of 1005"在第一张图像中可见,在较窄的网格中被截断.
也许有一个设置,或有人有一个解决方法.我宁愿第二个网格不必比它需要的更宽(我的解决方法是设置width一个值而不是'auto'或'inherit',但是这会使网格列变宽.一个适当大小的页面文本框将留有足够的空间用于寻呼机按钮加上我自己的按钮.
我的网格的寻呼机/自定义按钮看起来像这样:
.jqGrid('navGrid', '#icecreamPager',
{ search: true, edit: false, add: false, del: false, searchText: "Search" },
{}, // default settings for edit
{}, // default settings for add
{}, // default settings for delete
{closeOnEscape: true, closeAfterSearch: true, multipleSearch: true }, // settings for search
{}
)
.jqGrid('navButtonAdd', '#icecreamPager',
{ caption: "Edit", buttonicon: "ui-icon-pencil",
onClickButton: function () {
var grid = $("#icecreamGrid");
var rowid …Run Code Online (Sandbox Code Playgroud) 我正在学习jqGrid,希望最终将它连接到Redis数据库.作为第一步,我正在使用本地数据.这是我必须使用可排序的行(在网格中拖放行).网格显示并且看起来很好,列甚至可以排序,但我不能选择一行并移动它 - 我错过了什么?是因为数据是本地的吗?
加载css和js文件没有问题.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My First Grid</title>
<link rel="stylesheet" type="text/css" media="screen" href="themes/redmond/jquery-ui-1.8.23.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />
<script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.23.custom.min.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
jQuery("#mytable").jqGrid({
datatype:"clientSide",
data:[ {"number": 1, "segment":"frontmatter", "name": "chap0"},
{"number": 2, "segment":"mainmatter", "name": "chap1"},
{"number": 3, "segment":"backmatter", "name": "chap2"},
],
colNames:['Chapter Name', 'Chapter Number', 'Document Segment'],
colModel:[
{name:'name'},
{name:'number', …Run Code Online (Sandbox Code Playgroud) jqgrid ×8
jquery ×2
action ×1
button ×1
c ×1
editing ×1
javascript ×1
json ×1
msdn ×1
optimization ×1
performance ×1
php ×1
user-data ×1
winapi ×1
windows ×1