我想使用提供的链接打开一个编辑表单。我将如何开始做和修改它?我必须采取什么行动才能完成这项工作?真的需要这个。必须有一个简单的方法来调用那个动作?
所以我尝试做一个“双击”行,但每次我插入“datepicker”时它都会被禁用,如下所示。所以相反,现在我试图用上面的“编辑项目”链接打开表单编辑器?
<script type="text/javascript">
$(function(){
$("#list").jqGrid({
url:'request.php',
datatype: 'xml',
mtype: 'GET',
height: 350,
colNames:['id','Project', 'Assigned To','Assign Date','Check Date','Due Date','Attachments'],
colModel :[
{name:'id', index:'id', width:20},
{name:'name', index:'name', width:200, align:'left',editable:true, editoptions:{
size:70} },
{name:'id_continent', index:'id_continent', width:80, align:'right',editable:true,edittype:'select',
editoptions:{value: "Henry:Henry; Ramon:Ramon; Paul:Paul" } },
{name:'lastvisit', index:'lastvisit', width:70, align:'right',formatter: 'date',srcformat:'yyyy-mm-dd',newformat: 'm-d-Y',editable:true, edittype: 'text', },
{name:'cdate', index:'cdate', width:80, align:'right',formatter: 'date',srcformat:'yyyy-mm-dd',newformat: 'm-d-Y',editable:true, edittype: 'text',editoptions: {
size: 12,
maxlengh: 12,
dataInit: function (element) {
$(element).datepicker({ dateFormat: 'mm/dd/yy' }
)
}
},
editrules: {
date: true
}
},
{name:'ddate', index:'ddate', width:80, align:'right',formatter: 'date',srcformat:'yyyy-mm-dd',newformat: 'm-d-Y',date:'true',editable:true, edittype: 'text',},
{name:'email', index:'email', width:80,align:'center',sortable:false}
],
pager: '#pager',
rowNum:20,
rowList:[20,40,80],
sortname: 'id',
sortorder: 'desc',
viewrecords: true,
gridview: true,
caption: 'Pending Assignements',
//ondblClickRow: function(rowid) {
//$(this).jqGrid('editGridRow', rowid, {height:300,width:450,reloadAfterSubmit:false,closeAfterEdit:true,closeOnEscape:true});
//}
}).navGrid('#pager', { edit: true,del: true,add:false },
{},//Options for the Edit Dialog
{},//Options for the Add Dialog
{}//Options for Delete
),
jQuery("#list").jqGrid('delGridRow', row_id_s, options );});
</script>