相关疑难解决方法(0)

使用模式窗体添加新行时,使用jqGrid添加其他参数以发布数据

POST当我用模态形式添加新记录时,我需要为jqGrid的数据添加额外的动态参数.

我试过了:

$('#table').setPostData({group: id});
$('#table').setPostDataItem('group', id);
$('#table').setGridParam('group', id);
Run Code Online (Sandbox Code Playgroud)

没有任何成效.

javascript jquery jqgrid

5
推荐指数
2
解决办法
2万
查看次数

jqgrid添加行并将数据发送到webservice以进行插入

我已经能够使用jQuery/Ajax从Web服务中将数据从我的数据库中提取到jQGrid中.现在我想将添加/编辑的数据发送回Web服务.我通过使用PHP和editurl:命令看到了一些例子.这也适用于Web服务(就像我最初下载数据一样)?

我已多次查看这些例子了.我甚至发现了另一个类似于我所问的问题,我无法找到任何关于如何做我需要的实例.有存在吗?

:更新:

jQuery(document).ready(function () {
    jQuery("#list").jqGrid({
        datatype: processrequest,
        mtype: 'POST',
        jsonReader: {
            root: "ListExercise", //arry containing actual data  
            page: "Page", //current page  
            total: "Total", //total pages for the query  
            records: "Records", //total number of records  
            repeatitems: false,
            id: "ID" //index of the column with the PK in it   
        },
        colNames: ['Id', 'Exercise'],
        colModel: [
      { name: 'exercise_id', index: 'exercise_id',editable:false },
      { name: 'exercise_value', index: 'exercise_value',editable:true }
      ],
        caption: 'MyFitnessApplication',
        pager: '#pager',
        rowNum: 10,
        rowList: [10, 20, 30], …
Run Code Online (Sandbox Code Playgroud)

asp.net jquery web-services jqgrid

3
推荐指数
1
解决办法
6952
查看次数

如何将数据从JQGrid发送到我的查询以删除行?

我无法从我的JQGrid中删除一行,因为我无法弄清楚如何将我需要的数据发送到包含MySQL的文件.我正在使用ColdFusion.

在我的JQGrid文件中,我的editurl参数设置如下:

editurl: url+"process_delete.cfc?method=process_delete&region="+region,
Run Code Online (Sandbox Code Playgroud)

在我的process_delete.cfc文件中,我保存了我的MySQL查询,我有:

DELETE FROM awesome_table
WHERE region = '#region#' AND Field1 = '??????' AND Field2 = '???????'
Run Code Online (Sandbox Code Playgroud)

我知道MySQL正在到达 - 没有问题.此外,该区域从URL填充得很好.没有问题.问题是我无法弄清楚如何从我想要删除的行中访问数据以填充Field1和Field2,从而有效地完成查询.有人可以帮忙吗?谢谢.

对于删除,我有以下代码:

jQuery.jgrid.del = {
            caption: "Delete Item",
            msg: "Delete record?",
            bSubmit: "Delete",
            bCancel: "Cancel",
            beforeSubmit: function(postdata, formid) { 
                var rowid = $("#mygrid").getGridParam('selrow');
                $("#mygrid").jqGrid('saveRow',rowid,false,'clientArray');
                var rowvalues = $("#mygrid").getRowData(rowid);
                return [true, ""]
            }
Run Code Online (Sandbox Code Playgroud)

当我rowid在警告消息框中显示时,我得到"null",所以也许这就是我的问题所在.

coldfusion jquery jqgrid

1
推荐指数
1
解决办法
5710
查看次数

标签 统计

jqgrid ×3

jquery ×3

asp.net ×1

coldfusion ×1

javascript ×1

web-services ×1