第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

用過jquery jqgrid的幫忙看下這個問題。。。。

用過jquery jqgrid的幫忙看下這個問題。。。。

萬千封印 2018-12-06 17:54:10
<script type="text/javascript" charset="gb2132"> $(document).ready(function () { jQuery("#list").jqGrid({ url: 'ashx/BaseBranchManager.ashx?type=GetBaseBranch', mtype: 'POST', datatype: "json", height: 'auto', width: 500, colNames: ['編號', '名稱'], colModel: [ { name: 'BranchID', index: 'BranchID', width: '50' }, { name: 'BranchDesc', index: 'BranchDesc' } ], viewrecords: true, rowNum: 10, rowList: [10, 20, 30], sortname: 'CommentID', jsonReader: { root: "rows", page: "pageindex", total: "pagecount", records: "total", repeatitems: false, id: "0" }, loadonce: true, sortname: 'id', viewrecords: true, pager: "#pager", caption: "客戶列表", sortorder: "desc", hidegrid: false, onSelectRow: function (ids) { jQuery("#order").setGridParam({ url: "ashx/Handler.ashx?BranchId=" + ids, page: 1 }).trigger("reloadGrid"); alert(ids); } }); jQuery("#list").jqGrid('navGrid', '#pager', { edit: false, add: false, del: false }); jQuery("#order").jqGrid({ url: '', mtype: 'POST', datatype: "json", height: 'auto', width: 500, colNames: ['編號'], colModel: [ { name: 'BranchID', index: 'BranchID', width: '50' } ], viewrecords: true, rowNum: 10, rowList: [10, 20, 30], sortname: 'CommentID', jsonReader: { root: "rows", page: "pageindex", total: "pagecount", records: "total", repeatitems: false, id: "0" }, loadonce: true, sortname: 'id', viewrecords: true, pager: "#orderppage", caption: "客戶列表", sortorder: "desc", hidegrid: false }); jQuery("#order").jqGrid('navGrid', '#orderppage', { edit: false, add: false, del: false }); }); </script> 上面是我一個主從表的代碼,也就是點擊一個列后,另一個表根據(jù)ID綁定數(shù)據(jù)!但是出現(xiàn)這樣的情況,就是說,第一次點擊的時候,就會進入BaseBranchManager.ashx文件中,但是第二次再點擊就不可以!BaseBranchManager.ashx代碼如下: public void ProcessRequest (HttpContext context) { context.Response.ContentType = "application/json"; string resultJson = ""; if (context.Request["type"] == "GetBaseBranch") { resultJson = GetBaseBranch(); } if (context.Request["type"] == "GetOrderCar") { resultJson = SelectOrderdtByBanchId(context.Request["BranchId"].ToString()); } context.Response.Write(resultJson); } private static string GetBaseBranch() { WcfService.ProductsServiceClient pr = new WcfService.ProductsServiceClient(); DataTable dt = pr.GetBaseBranch(); // 每頁顯示記錄數(shù) int pageSize = 10; // 記錄總數(shù) int rowCount = dt.Rows.Count; // 總頁數(shù) int pageCount = rowCount % pageSize == 0 ? rowCount / pageSize : rowCount / pageSize + 1; var resultObj = new DataResult { // 總頁數(shù) PageCount = pageCount, // 當前頁 PageIndex = 1, // 總記錄數(shù) Total = rowCount, // 數(shù)據(jù) Data = dt }; string resultJson = JsonHelper.Serialize(resultObj); return resultJson; } 試過用其他ASP頁面來實現(xiàn),但是如果我用?Response.End()的話,就第二次不進來執(zhí)行方法,不用?Response.End()的話,又不顯示數(shù)據(jù)!請問這是什么回事呢!
查看完整描述

1 回答

?
30秒到達戰(zhàn)場

TA貢獻1828條經(jīng)驗 獲得超6個贊

去除
 loadonce: true,問題解決!
查看完整回答
反對 回復(fù) 2018-12-24
  • 1 回答
  • 1 關(guān)注
  • 604 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號