我有一个jQuery网格,其中包含用户数据的数据.当我点击我需要在网格底部显示其他网格时,我需要处理每个网格行的网格行点击.
有些事情与此非常相似:
http://www.trirand.com/blog/jqgrid/jqgrid.html
转到高级—>掌握细节
谢谢
解决方法
onSelectRow是使细节网格从主网格加载信息的原因.
onSelectRow: function(ids) { if(ids == null) { ids=0; if(jQuery("#list10_d").jqgrid('getGridParam','records') >0 ) { jQuery("#list10_d").jqgrid('setGridParam',{url:"subgrid.PHP?q=1&id="+ids,page:1}); jQuery("#list10_d").jqgrid('setCaption',"Invoice Detail: "+ids) .trigger('reloadGrid'); } } else { jQuery("#list10_d").jqgrid('setGridParam',page:1}); jQuery("#list10_d").jqgrid('setCaption',"Invoice Detail: "+ids) .trigger('reloadGrid'); } }