博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jqgrid content-type datatype
阅读量:6239 次
发布时间:2019-06-22

本文共 9658 字,大约阅读时间需要 32 分钟。

jQuery('#jq2').jqGrid(                      {                      url: 'http://localhost:8080/api/RskPriceFactorTest/senario/0/detail',                      editurl: 'http://localhost:8080/api/RskPriceFactorTest/update/scenario/detail',                      exportUrl: '/RSK/RskStressTestCaseManage2.html&jqGridID=jq2',                       datatype: function (pdata) {                                               $.ajax({                                 type: "GET",                                 dataType:"json",                                 url: "http://localhost:8080/api/RskPriceFactorTest/senario/"+pdata.txt_RiskStressTestCaseId_+"/detail",                                 contentType: "application/json",                                 data:pdata,                                 success: function (data) {                                   var thegrid = jQuery("#jq2")[0]                                   thegrid.addJSONData(data);                                   }                              })                          alert("可香槟"+ JSON.stringify(pdata))                       },                      page: 1,                      colNames: [                        "编辑",                        "风险价格因子",                        "运算符",                        "绝对值或百分比",                        "币种",                        "冲击值",                        "时间长度",                        "限额值",                        "生效日期",                        "终止日期",                        "Id"                      ],                      colModel: [                        {                          "frozen": true,                          "superFilterColumn": "act",                          "summaryTpl": "{0}",                          "name": "act",                          "supperControlType": "input",                          "formatter": changeOp,                          "align": "center",                          "index": "act",                          "searchoptions": {                                                      }                        },                        {                          "frozen": true,                          "summaryTpl": "{0}",                          "name": "indexPriceFactorName",                          "superFilterColumn": "indexPriceFactorName",                          "searchoptions": {                                                      },                          "supperControlType": "input",                          "index": "indexPriceFactorName"                        },                        {                          "summaryTpl": "{0}",                          "editable": true,                          "name": "shockModeName",                          "superFilterColumn": "shockModeName",                          "searchoptions": {                                                      },                          "supperControlType": "input",                          "edittype": "select",                          "editoptions": {                            "value": "12801:加上;112803:减去;112802:乘上"                          },                          "index": "shockModeName"                        },                        {                          "summaryTpl": "{0}",                          "editable": true,                          "name": "shockValueTypeName",                          "superFilterColumn": "shockValueTypeName",                          "searchoptions": {                                                      },                          "supperControlType": "input",                          "edittype": "select",                          "editoptions": {                            "value": "137001:绝对值;137002:百分比"                          },                          "index": "shockValueTypeName"                        },                        {                          "summaryTpl": "{0}",                          "editable": true,                          "name": "valueCurrencyName",                          "superFilterColumn": "valueCurrencyName",                          "searchoptions": {                                                      },                          "supperControlType": "input",                          "edittype": "select",                          "editoptions": {                            "value": "EUR:欧元;CAD:加币;CNY:人民币;USD:美元;JPY:日圆;HKD:港币"                          },                          "index": "valueCurrencyName"                        },                        {                          "summaryTpl": "{0}",                          "editable": true,                          "name": "shockValue",                          "superFilterColumn": "shockValue",                          "searchoptions": {                                                      },                          "supperControlType": "input",                          "index": "shockValue"                        },                        {                          "summaryTpl": "{0}",                          "editable": true,                          "name": "timeHorizon",                          "superFilterColumn": "timeHorizon",                          "searchoptions": {                                                      },                          "supperControlType": "input",                          "index": "timeHorizon"                        },                        {                          "summaryTpl": "{0}",                          "editable": true,                          "name": "stressTestLimitValue",                          "superFilterColumn": "stressTestLimitValue",                          "searchoptions": {                                                      },                          "supperControlType": "input",                          "index": "stressTestLimitValue"                        },                        {                          "summaryTpl": "{0}",                          "classes": "aa",                          "searchoptions": {                                                      },                          "name": "startDate",                          "superFilterColumn": "startDate",                          "formatter": getDate,                          "supperControlType": "input",                          "index": "startDate",                          "editable": true                        },                        {                          "summaryTpl": "{0}",                          "classes": "aa",                          "searchoptions": {                                                      },                          "name": "endDate",                          "superFilterColumn": "endDate",                          "formatter": getDate,                          "supperControlType": "input",                          "index": "endDate",                          "editable": true                        },                        {                          "summaryTpl": "{0}",                          "superFilterColumn": "id",                          "name": "id",                          "supperControlType": "input",                          "searchoptions": {                            "searchhidden": true                          },                          "hidden": true,                          "key": true,                          "index": "id"                        }                      ],                      viewrecords: true,                      scrollrows: false,                      postData: $('body').GetSearchPostData(),                      styleUI: 'Bootstrap',                      postBackUrl: "__doPostBack('jq2','jqGridParams')",                      editDialogOptions: {                        "recreateForm": true,                        errorTextFormat: function(data){                          return'Error: '+data.responseText                        }                      },                      addDialogOptions: {                        "recreateForm": true,                        errorTextFormat: function(data){                          return'Error: '+data.responseText                        }                      },                      delDialogOptions: {                        errorTextFormat: function(data){                          return'Error: '+data.responseText                        }                      },                      searchDialogOptions: {                                              },                      viewRowDetailsDialogOptions: {                                              },                      jsonReader: {                        id: "Id"                      },                      rowNum: 50,                      rowList: [                        50,                        100,                        200                      ],                      sortorder: 'asc',                      hidegrid: false,                      height: '400',                      autowidth: true,                      headertitles: true,                      rownumbers: true,                      shrinkToFit: false,                      pager: jQuery('#jq2_pager'),                      viewsortcols: [                        false,                        'vertical',                        true                      ],                      loadComplete: gridComplete1,                      ondblClickRow: jq2DoubleClick,                      loadError: jqGrid_aspnet_loadErrorHandler                    }                                                                );

 

转载于:https://www.cnblogs.com/kexb/p/10441078.html

你可能感兴趣的文章
Spark随谈(一)—— 总体架构
查看>>
算法系列15天速成——第十四天 图【上】
查看>>
django 快速实现登录
查看>>
导入数据时遇见ORA-00054
查看>>
模拟终端打印效果特效
查看>>
forfiles命令批量删除N天前文件
查看>>
顺序队列
查看>>
(NO.00005)iOS实现炸弹人游戏(三):从主场景类谈起
查看>>
git/github初级运用自如
查看>>
《Netty 权威指南》—— NIO类库简介
查看>>
Codeforces 452 A. Eevee
查看>>
小鱼儿CTO赵兴国:基于阿里云的互联网+视频会议系统实践
查看>>
基于smack的即时聊天系统之文件传输功能实现
查看>>
Boa服务器的移植
查看>>
Linux网络编程入门
查看>>
help
查看>>
我的友情链接
查看>>
GIT服务器配置及同步站点目录
查看>>
我的友情链接
查看>>
以太坊中的nonce是什么
查看>>