我发布wuth firefox没有显示样式"text-decoration:line-through".
我使用jqGrid显示药物列表.如果药物不活跃,则必须将其交叉.在我的afterInsertRow事件中,我这样做:
$('#' + rowid).css({ 'text-decoration': 'line-through', 'color': 'red' })
Run Code Online (Sandbox Code Playgroud)
它适用于IE和Chrome,但Firefox只显示没有交叉线的红色文本.当我查看firebug输出时,我可以看到该元素具有样式定义,包括文本修饰,但它根本不显示我需要的方式.任何帮助表示赞赏.谢谢
我偶然发现了一些我希望有人可以向我解释的代码.
这在jqGrid的上下文中使用.
onSelectRow: function(id){
if(id && id!==lastsel){
jQuery('#rowed3').jqGrid('restoreRow',lastsel);
jQuery('#rowed3').jqGrid('editRow',id,true);
lastsel=id;
}
},
Run Code Online (Sandbox Code Playgroud)
为什么在javascript中对字符串使用逻辑运算符,如上所示?这只是一个错误还是这里有一些我不明白的功能?
代码来自http://trirand.com/blog/jqgrid/rowedex3.html
完整示例http://trirand.com/blog/jqgrid/jqgrid.html >行编辑>使用事件
success: function (result) {
var messages = result;
for(var i=0;i<=messages.length;i++)
jQuery("#responseMessages").jqGrid(
'addRowData',
i+1,
{distance:messages[i].distance,age:messages[i].age,message:messages[i].message}
);
}
Run Code Online (Sandbox Code Playgroud)
所以这是我对我的mvc应用程序的Ajax调用的成功回调函数.然后循环响应并进入JQgrid中的每一行.但是,我在我的页面上收到此错误:
messages[i] is undefined
Run Code Online (Sandbox Code Playgroud)
即使所有行都在那里,它似乎工作正常......
是否可以在固定位置设置行?例如,我们现在有一个总行,我们总是希望总计在排序等之后.
有插件吗?
我们尝试通过重绘整个表来在onLoadComplete中执行此操作,如下所示:
var rowIDs = $(this).getDataIDs();
var rowID, columnID;
$(this).clearGridData();
for (rowID in rowIDs) {
for (columnID in data.rows[rowID]) {
$(this).addRowData(rowIDs[rowID], data.rows[rowID], (data.rows[rowID][columnID].first ? 'first' : null));
break; // Only do this for the first column
}
}
Run Code Online (Sandbox Code Playgroud)
但这对性能不利,我们有数千行.
在奥列格的评论之后:
总行只是我们数据集的一行.数据集具有以下格式:
专栏:'网络','点击','观看'
data = [
{
'Network': {value:'Google'}, 'Clicks': {value:38392882}, 'Views':{value:3939922}
},
{
'Network': {value:'Sanoma'}, 'Clicks': {value:177883}, 'Views':{value:39293}
},
...
,
{
'Network': {value:'Total'}, 'Clicks': {value:993832732223}, 'Views':{value:3932293939}, 'first': true
},
...
]
}
Run Code Online (Sandbox Code Playgroud)
所以我们在数据行中设置我们想要在哪一行('first':true).
通过处理,我们使用它来设置在表的顶部.希望这更容易理解:)
提前致谢,
涡流
我使用jqgrid和mvc 3,我想在JqGrid的每一行添加Edit和Delete按钮,我已经通过这个链接实现了这个功能.但它是内联编辑,我想在点击编辑按钮时打开一个弹出窗口.
我怎样才能实现这个目标.
谢谢
有没有人有一个将日期格式化程序与服务器端数据库一起使用的例子,或者你能指点我帮忙吗?
我有一个jqPlot图表,如下图所示.
我使用LinearAxisRenderer作为x轴.
但x轴值为0,1,1,2,2等.
有没有办法让值为0,1,2,3等.
提前致谢.

代码:
$.jqplot(ctrlId, [graphPt], {
title: chartTitle,
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
pointLabels: { show: true, location: 'e', edgeTolerance: -15, formatString: '%s' },
shadow: false,
rendererOptions: {
barDirection: 'horizontal',
barMargin: 2
}
},
axesDefaults: {
renderer: $.jqplot.canvasAxisTickRenderer,
min: 0, // minimum numerical value of the axis. Determined automatically.
pad: 1.3, // a factor multiplied by the data range on the axis to give the
// axis range so that data points don't fall on the edges of …Run Code Online (Sandbox Code Playgroud) 我正在使用jqGrid PHP.添加新行(内联模式)时,如何使用与上一个选定行相同的单元格数据预填充新行?非常感谢.
由于我是jqGrid中的新手,我对此问题非常困惑.我的数据只显示10行.这是我的剧本;
jQuery("#list").jqGrid({
url:'dounfinish.php?q=1',
datatype: 'json',
mtype: 'POST',
closeafteredit:true,
colNames:['id','Date', 'Line','Model','Lotno','Qty','PIC'],
colModel :[
{name:'id', index:'id', hidden:true, width:55},
{name:'Date', index:'Date', width:90, editable:true, search:true, stype:'text',searchoption:{sopt:['cn']}},
{name:'Line', index:'Line', width:80, editable:true, search:true, stype:'text',searchoptions:{sopt:['cn']}},
{name:'Model', index:'Model', width:180, editable:true, search:true, stype:'text',searchoption:{sopt:['cn']}},
{name:'Lotno', index:'Lotno', width:80, editable:true, search:true, stype:'text',searchoption:{sopt:['cn']}},
{name:'Qty', index:'Qty', width:80, editable:true, search:true, stype:'text',searchoptions:{sopt:['cn']}},
{name:'PIC', index:'PIC', width:180, editable:true, search:true, stype:'text',searchoption:{sopt:['cn']}}
],
// pager: jQuery('#pager'),
gridview:true,
pager: '#pager',
width: '100%',
height: '100%',
rowNum:10,
rowList:[10,20,30],
sortname: 'Date',
sortorder: "desc",
viewrecords: true,
loadonce: true,
// imgpath: 'themes/basic/images',
caption: 'DAILY CHECK QTY', …Run Code Online (Sandbox Code Playgroud) jqgrid ×10
javascript ×3
jquery ×2
asp.net-mvc ×1
filtering ×1
firefox ×1
jqgrid-php ×1
jqplot ×1
json ×1
operators ×1
php ×1
string ×1
styles ×1
word-wrap ×1