Jqgrid에서 Handler를 사용하여 FileUpload를 수행했습니다. "추가"를 클릭하면 파일을 찾아보고 값을 업로드 할 수 있습니다.
그러나 지금 같은 경로를 편집하려면 "편집"을 클릭 할 때 이미 찾아 본 파일을 가져 오지 않습니다.
아래는 colmodel입니다.
{
name: 'FormPath', index: 'FormPath', editable: true, width: 50, edittype: 'file',
editoptions:
{
enctype: "multipart/form-data"
},
formatter: function (cellvalue, options, rowObject)
{
return '<a href="' + cellvalue + '">' + rowObject.FormDisplayName + '</a>';
},
unformat: function (cellvalue, options, cell)
{
return $('a', cell).attr('href');
}
}
아래는 Form_edit 대화 상자에서 호출 한 beforeshowForm 이벤트입니다. 다른 컨트롤은 올바른 데이터를 바인딩합니다. 그러나이 FormPath 는 그렇지 않습니다.
beforeShowForm: function (form)
{
$("#FormError").remove();
$("#tr_FormDisplayName", form).show();
$("#tr_FormPath", form).show();
$('#tr_FormDesc', form).show();
$('#tr_SecurityTag', form).show();
}
누구든지 jqgrid의 편집 대화 상자에서 형식화되지 않은 값을 셀에 채우는 방법을 알고 있습니다.
미리 감사드립니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다