编辑时jq网格中的问题 [英] Problem in jq grid while Editing
本文介绍了编辑时jq网格中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在jqgrid我输入值,同时留下一些时间显示html格式,如在文本框中显示< inpu type ... =如何过来这请帮助我这个< / xml>>
In jqgrid im entering values while leaving some times showing html formats like in textbox its showing "<inpu type...=" how to over come this please help me on this</xml>">
推荐答案
您可以使用格式化程序来处理您想要编辑的列,并保存数据模糊。任何列的格式化程序都可以添加如下: -
You can rather use formatter for the column you want editable and save data on blur of it. Formatter for any column can be added as follows :-
var vColNames = ['Name', 'Location'];
var vColModel = [
{ name: 'Name', index: 'Name', sortable: true, formatter: ColumnFormatter, align: "center" },
{ name: 'Location', index: 'Location', sortable: true, align: "center" },
];
function ColumnFormatter(cellvalue, options, rowObject) {
return "<input id="inptSave_" + rowObject.DataPrimaryKeyID + "" name="chkPlanAdminSelect" type="text" onblur="SaveData(this);" value=""+cellvalue+"" checked="checked" />"
}
function SaveData(sender) {
alert(sender.value);
// Save your data here
}
希望这对你有帮助。
Hope this will definitely of help to you.
这篇关于编辑时jq网格中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文