드롭 다운이있는 jqGrid가 있습니다. 나는 "custom formatter"(dropDownFormatter1
) 값으로 드롭 다운을 채우고있다. 나는 그것을 얻고있다. 그러나 onchange
에 따라 나는 어떤 기능을 할 필요가있다. 내 주요 질문은 아래 코드에 onchange
이벤트를 추가하는 방법입니다.jqGrid에서 이벤트 처리기를 호출하는 방법 사용자 정의 포메터를 선택하십시오.
$("#grid").jqGrid({
url: bookingStatusurl,
datatype: "json",
shrinkToFit: true,
colModel: [
{ name: 'BookingStatusID', index: ''BookingStatusID'', hidden: true,
key: true },
{ name: 'BookingStatus', index: 'BookingStatus', width: 260,
sortable: false },
{ name: 'NumberOfBooking ', index: 'NumberOfBooking', width: 300,
sortable: false, align: 'right', formatter: 'currency',
formatoptions: { prefix: "Number Of Booking: "} },
{ name: 'SortOrderType', index: 'SortOrderType', align: 'right',
edittype: 'select', formatter: **dropDownFormatter1** }
//As per the on change of my dropDownFormatter1 by subgrid need to change.
],
rowNum: 40,
rowList: [40, 80, 120]
//sortname: 'id',
viewrecords: true,
//sortorder: "desc",
autowidth: true,
multiselect: false,
shrinkToFit: true,
height: 'auto',
altRows: true,
subGrid: true,
//loadonce: false,
//caption: "Pipeline By Booking Status",
subGridRowExpanded: function (subgrid_id, row_id) {}
});
가 cutom 포매터 코드입니다 :
function dropDownFormatter1(cellvalue, options, rowObject, action) {
// var statusTypeId = rowObject[0];
return '<label>Sort Order:</label>' +
'<select>' +
'<option value="asc">asc</option>' +
'<option value="desc">desc</option>' +
'</select>';
}
저를 도와주세요
여기 내 코드입니다.
감사합니다.
감사합니다. Oleg.As 평소처럼 바위. – Mini
@ 미니 : 천만에! – Oleg