$(document).ready(
function() {
$("#ZBinfo").ingrid({ 
url: 'RunRecLogList.aspx',
type:'POST',
height: 200,
minColWidth: 50,
initialLoad: true,
savedStateLoad: true,
colWidths: [150,150,150,150,150,150,150], // width of each column
rowClasses: ['grid-row-style1','grid-row-style1','grid-row-style2','grid-row-style1','grid-row-style1','grid-row-style3'],
//onRowSelect: function(tr, selected){
//var str  = selected ? 'SELECTED' : 'UNSELECTED';
//var tr_html = $(tr).html();
//alert( str + ' Row. InnerHTML is : ' + tr_html);
//},
sorting: false,
resizableCols: true,
paging: false,
recordsPerPage: 5,
totalRecords: 10,
extraParams: {type: 'all',params:'none'}
});
这样没有问题,第一次初始化。当我查询按钮查询时,执行别外一个JS函数,代码如下:
<script type="text/javascript">
        function RunTreeNodeSel(obj)
        {         $("#ZBinfo").ingrid({ 
url: 'RunRecLogList.aspx',
type:'POST',
height: 200,
minColWidth: 50,
initialLoad: false,
savedStateLoad: true,
colWidths: [150,150,150,150,150,150,150], // width of each column
rowClasses: ['grid-row-style1','grid-row-style1','grid-row-style2','grid-row-style1','grid-row-style1','grid-row-style3'],
sorting: false,
resizableCols: true,
paging: false,
recordsPerPage: 5,
totalRecords: 10,
extraParams: {type : 'Query',params:obj}
});
  alert(obj)
       //    RunRecLogView.GetXMLSql("RunLog.xml",obj);
        }
    </script>obj是查询参数,可以弹出来,可这个代码并没有执行,还是以前那个表格的数据。调试也没有执行到'RunRecLogList.aspx'这是为什么了。还是写错了?