jqGrid 编辑传参 与后台交互

本文介绍了如何使用jqGrid进行前端表格展示,并与后台进行数据交互。前端部分展示了jqGrid的配置,包括表格列定义、编辑类型设置等。后台部分详细解释了获取查询参数、分页处理及数据编辑(增删改)的方法,涉及到Struts操作。
摘要由CSDN通过智能技术生成

一、前台:

  html代码:

<table id="chartTable" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="chartpager"></div>

 

js代码:

jQuery("#chartTable").jqGrid({
   url : '../dashbord/getAllChart.do',
   datatype : "json",
   colNames : [ "ID", "视图ID", "图表类型", "标题", "Y坐标显示","X坐标显示","数据SQL","分类名称","刷新时间" ],
   colModel : [ {
    name : "id",
    index : "id",
    width : 100,
    align : "center"
   }, {
    name : "pid",
    index : "pid",
    width : 100,
    align : "center",
    editable : true
   }, {
    name : "type",
    index : "type",
    width : 185,
    editable : true,
    align : "left",
    edittype : "select",
    editoptions : {
     value : "areaChart:区域图;lineChart:折线图;columnChart:柱状图;panelChart:仪表盘;pieChart:饼图"
    }
   }, {
    name : "title",
    index : "title"

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值