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

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

JQuery Grid-SubGrid用于父子關系

JQuery Grid-SubGrid用于父子關系

胡說叔叔 2019-11-04 09:44:02
我需要一些有關如何在以下sceaniro中實現(xiàn)子網(wǎng)格的想法。以下是我想在JQuery Grid和Subgrid中顯示的json數(shù)據(jù)?;旧?,我得到了一個名為“ Contact”的對象,該對象具有一個名為“ actionSet”的集合。{ "total" : "10", "page" : "1", "records" : "78", "rows" : [ {   "comment" : null,   "givenName" : "Contact A",   "familyName" : "A",   "actionSet" : [ {       "actionID" : 1,       "actionDueDate" : "2012-12-08",       "actionNote" : "Action 1"       }, {       "actionID" : 2,       "actionDueDate" : "2012-12-08",       "actionNote" : "Action 2"  } ] }    ...]}我希望每個網(wǎng)格行都顯示“聯(lián)系人”,并且與網(wǎng)格關聯(lián)的子網(wǎng)格應顯示“ actionSet”集合。當選擇了網(wǎng)格中的特定行時,我不想進行服務器調(diào)用以獲取關聯(lián)的動作,因為它們已經(jīng)存在于“ actionSet”中。我已經(jīng)使Grid正常工作,很好地顯示了“ Contacts”,但是在實現(xiàn)子網(wǎng)格時,由于如何獲取其數(shù)據(jù)而感到困惑,因為它已經(jīng)可以在json中使用了。jq(function() { jq("#grid").jqGrid({ url:'/smallworks/project/getall.do', datatype: 'json', mtype: 'GET',   colNames:['Id', 'First Name', 'Last Name'],   colModel:[     {name:'id',index:'id', width:55,editable:false,editoptions:   {readonly:true,size:10},hidden:true},   {name:'givenName',index:'givenName', width:100,editable:true, editrules:{required:true}, editoptions:{size:10}},   {name:'familyName',index:'familyName', width:100,editable:true, editrules:{required:true}, editoptions:{size:10}}  ],  postData: {  },  rowNum:20,  rowList:[20,40,60],  height: 200,  autowidth: true,  rownumbers: true,  pager: '#pager',  sortname: 'id',  viewrecords: true,  sortorder: "asc",  caption:"Contacts",  emptyrecords: "Empty records",  loadonce: false,  loadComplete: function() {  },這可以實現(xiàn)嗎?我是否需要專門為子網(wǎng)格解析JSON數(shù)據(jù)?如何做到這一點?
查看完整描述

3 回答

  • 3 回答
  • 0 關注
  • 635 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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