JQGrid,Retain formatter textbox values after search operation

守給你的承諾、 提交于 2020-01-24 21:13:11

问题


I have a jqGrid with a textbox formatter column. When I perform search operation after entering something in the textbox, the textbox gets cleared. I want to retain the values in the textbox even after the search. Here's my code:

colModel : [ 
   {name:'val',index:'val', width:40, align:'center',searchoptions: { sopt: ['eq'] } },
   {name:'id',index:'id', width:50,sortable:false,align:'center',edittype: "text",search:false,formatter:ctrlformat}            
]


function ctrlformat (cellvalue, options, rowObject ){       
return '<input type="text" id='+cellvalue+' name="valId" />';

    $("#list").jqGrid('filterToolbar', {stringResult: true, searchOnEnter:true});   
}

来源:https://stackoverflow.com/questions/17522296/jqgrid-retain-formatter-textbox-values-after-search-operation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!