편집 모드에있는 셀을 클릭하면 딥 편집이 시작됩니다.
이 방법이 가장 좋지 않지만 작동하지 않는 것 같습니다.
this answer의 코드가 필요하며 클릭하려는 요소를 가져 오는 방법이 필요합니다. ui-grid-cellNav가 활성화되어 있으므로 셀에 클래스가 있습니다. 'ui-grid-cell-focus'
또한 어쨌든 jQuery를 사용하고 있습니다.
$('.ui-grid-cell-focus').parent().find('form').children()[0]
내가 그럼 난 부모를 얻을 셀을 선택, 그 안에 양식 요소를 발견하고 그냥 일반 입력 상자보다 더 도와 드리겠습니다 희망에 그 내부의 첫 번째 자식 요소를 선택합니다.
여기 모든 것이 있습니다.
function eventFire(el, etype) {
if (el.fireEvent) {
(el.fireEvent('on' + etype));
} else {
var evObj = document.createEvent('Events');
evObj.initEvent(etype, true, false);
el.dispatchEvent(evObj);
}
}
$scope.gridOptions.onRegisterApi = function (gridApi) {
gridApi.edit.on.beginCellEdit($scope, function (rowEntity, colDef, newValue, oldValue) {
eventFire($('.ui-grid-cell-focus').parent().find('form').children()[0], 'click');
});
};