jqgrid 中组合框的值和key

2019-03-25 13:50|来源: 网路

在jqgrid中有一个组合框
{name:"sts",index:"sts",label:"sts",editable:true,edittype:'select',editoptions:{value:"0:"通过" ;9:否決"}},
现在我要取sts列的值
var data=$("#gridTable").jqGrid("getRowData",row);
var sts=data.sts
结果sts为 "通过" 或"否決"
怎样取到组合框的key的值呢?
谢谢!

相关问答

更多
  • 我之前在回答您之前的答案时写过你,你不能将内联编辑与单元格编辑混合在一起。 只有在使用单元格编辑时才会调用afterSaveCell的回调。 因此,您应该使用aftersavefunc回调来根据另外两列的新值重新计算totalAmount列的包含。 例如,如果您有列amount和quantity并且需要根据列中的新值重新计算totalAmount ,则可以执行以下操作: ondblClickRow: function (rowid,name,val,iRow,iCol) { $(this).jqGr ...
  • 由于您没有发布代码,因此很难帮助您。 我只能假设您在模式对话框中的网格和主页面上的网格之间可能存在ID冲突。 我建议你在模态对话框中添加idPrefix选项和一些非空的唯一值。 例如,您可以在第一个网格中添加idPrefix: "g1_" ,在第二个网格中添加idPrefix: "g1_" 。 那么带有ids“1”,“2”,“3”的"g1_3"在第一个网格中为"g2_1" , "g2_2" , "g2_3" ,并且在其中将有"g2_1" , "g2_2" , "g2_3"第二个网格。 It's diffic ...
  • 您真正需要的是jqgrid能够在您需要使用TinyMCE编辑的textarea或div上设置自己的自定义类或ID。 此外,tinyMCE的init代码设置为与此示例中相同的类名: http : //www.tinymce.com/tryit/basic.php 在该配置中,tinyMCE设置为加载所有textareas,但您可以将其更改为任何CSS选择器,例如“.myClassName”或“#myTextarea”。 All you really need is for jqgrid to be able ...
  • 如果我理解你的问题是正确的,你应该使用GridUnload方法。 请看下面的答案 ,其中包括演示 。 该演示展示了如何删除当前网格,并在同一个地方创建另一个带有其他参数的网格(另一列)。 我希望这是你需要的。 If I understand your question correct, you should use GridUnload method. Look at the following answer which include the demo. The demo shows how to rem ...
  • 问题就像我在问题的评论中描述的那样:我似乎没有下载包含附加方法的jqGrid,其中包括GridUnload和GridDelete。 下载了包含这些副本的副本后,现在可以使用了。 Problem was as I described in the comments to the question: I appeared not to have download jqGrid with the Additional Methods included, which include GridUnload and G ...
  • 官方jqGrid演示页面中的许多演示都非常古老 。 换句话说,“版本3.3中的新建” - >“行拖放”的演示在当前版本的jqGrid中不起作用。 。 另一方面“版本3.6中的新功能” - >“可排序行”提供了可以使用的sortableRows方法的演示。 它在内部使用jQuery UI Sortable小部件。 所以你不需要包含jqTableDnD-0.5.js 。 您可以在StackOverflow中搜索更多示例,以演示sortableRows的用法。 例如,旧的答案显示了如何使用update回调( st ...
  • 看看工作示例 。 I am assuming that your both combo boxes uses database for their data. In the first combobox's editoptions please use the following code: editoptions: { value: "1:One;2:Two", dataEvents: [{ type: "change", fn: function(e) { ...
  • 你可以使用setGridWidth属性 $('#gridId').jqGrid('setGridWidth', '800'); 如果您希望网格动态调整大小,请勾选窗口重新调整大小功能,但请记住设置初始宽度 var DataGrid = $('#gridId'); //sets the grid size initially DataGrid.jqGrid('setGridWidth', parseInt($(window).width()) - 20); //handles the ...
  • 这只会在您致电时触发: $('#jqGrid').jqGrid('editRow', rowId, false); 参考: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing#saverow this will only fire if you call: $('#jqGrid').jqGrid('editRow', rowId, false); Reference: http://www.trirand.com/jqg ...
  • 你可以尝试complete: function(){// here your jqgrid}这个complete: function(){// here your jqgrid} : “loadonce:true”不需要使用它,因为您的数据类型是本地的 var RGrid = []; $.ajax({ url: restApi + EndPoint + '/' + Number, type: 'GET', success: function (response) { ...