jeasyui cell 편집 모드
페이지 정보

본문
<div>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="func_save()">저장</a>
</div>
<table id="table_id" data-options="onClickCell:func_click,
onEndEdit:func_onEndEdit,
onDblClickRow:func_dbclick,
queryParams:{}">
>
<tr>
<th data-options="field:'sd_date'">재고날짜</th>
<th data-options="field:'gg_code'">품목코드</th>
<th data-options="field:'gg_name'">품목명</th>
<th data-options="field:'sd_custom_in',align:'right',formatter:func_number_check,editor:{type:'numberbox'}" sortable="true">맞춤입고</th>
<th data-options="field:'sd_custom_out',align:'right',formatter:func_number_check,editor:{type:'numberbox'}" sortable="true">맞춤출고</th>
<th data-options="field:'sd_now',align:'right',formatter:func_number_check" sortable="true">현재재고</th>
</tr>
</table>
<script>
var choiceIndex = undefined;
$(document).ready(function (e) {
$("#<?=$gridInfo["id"];?>").datagrid('enableCellEditing').datagrid('gotoCell', {});
});
function func_click (index, field, value) {
//console.log(index);
choiceIndex = index;
}
function func_onEndEdit(index, row) {
//console.log(choiceIndex, "::", index, "::", row);
$.post("json/update.json.php", {row}, function (data) {
});
}
function func_save() {
$('#table_id').datagrid('endEdit', choiceIndex);
$('#table_id').datagrid('reload');
}
function func_dbclick (index, field, value) {
console.log(field);
}
</script>
- 이전글chartjs 3.7 에서 챠트 만들기 22.05.04
- 다음글ajax (post, get)실행시, 전역번수 이용하기 - async:false 21.09.23
댓글목록
등록된 댓글이 없습니다.