【发布时间】:2014-03-19 11:42:35
【问题描述】:
这有点奇怪,但无论我做什么,寻呼机中的页码字段都没有更新。我可以输入页码,它会返回正确的记录,它会在调用时返回正确的页码信息
$('#jqGrid01').getGridParam('page')
如果我使用寻呼机按钮,它将正确刷新网格,但不会更新文本字段中的页码!
这是网格代码..
jQuery("#jqGrid01").jqGrid({
// data: mydata, datatype: "local",
url:'localhost/gridx/dashb_grid', mtype : "get", datatype: "json",
jsonReader: { root: "rows", page: "page", total: "total", records: "records", repeatitems: true, cell: 'cell', id: 'stock1', userdata: 'userdata'},
height: $gridh, rowNum: 100, rowList: [100,200,300,500,1000,2000,3000],
colNames:['Stock 1','Stock 2', 'Price 1', 'Price 2','Ratio','Correlation','ST % Mean', 'ST Drift', 'LT % Mean', 'LT Drift', 'RSI', 'RSI Drift', 'Beta 1', 'Beta 2', 'Industry 1', 'Industry 2', 'Earnings 1', 'Earnings 2'],
colModel:[
{name:'stock1',index:'stock1', width:30, searchoptions:{sopt:['eq','ne','cn','bw','ew','lt','gt']}},
{name:'stock2',index:'stock2', width:30, searchoptions:{sopt:['eq','ne','cn','bw','ew','lt','gt']}},
{name:'price1',index:'price1', width:30, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'price2',index:'price2', width:30, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'ratio',index:'ratio', width:30, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'correlation',index:'correlation', width:42, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'st_mean',index:'st_mean', width:38, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'st_drift',index:'st_drift', width:35, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'lt_mean',index:'lt_mean', width:39, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'lt_drift',index:'lt_drift', width:35, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'rsi',index:'rsi', width:30, sorttype:"int", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'rsi_drift',index:'rsi_drift', width:35, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'beta1',index:'beta1', width:30, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'beta2',index:'beta2', width:30, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'industry1',index:'industry1', width:102, search:false},
{name:'industry2',index:'industry2', width:102, search:false},
{name:'earnings1',index:'earnings1', width:45, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}},
{name:'earnings2',index:'earnings2', width:45, sorttype:"float", align:"right", searchoptions:{sopt:['eq','ne','lt','gt']}}
],
pager: "#jqGridPager01",
viewrecords: true, hidegrid:false,
sortname: 'stock1', sortorder: 'asc',
loadComplete: function() {
// test
}
});
还尝试检查文本框元素,但它没有 id,所以我无法手动设置它,我在 jqGrid 文档或谷歌中找不到任何东西来设置它!
知道我做错了什么,如何解决它!
谢谢
【问题讨论】:
标签: javascript jquery jqgrid