This is a migrated thread and some comments may be shown as answers.

kendo grid Event in the kendoMaskedTextBox enter event

1 Answer 181 Views
MaskedTextBox
This is a migrated thread and some comments may be shown as answers.
주호
Top achievements
Rank 1
주호 asked on 18 May 2017, 12:00 AM

kendoMaskMaskedTextBox 이벤트를 통해 검도 그리드의 값을 변경하고 싶지만 enter 이벤트 

작동하지 않습니다 어떻게 변환합니까?

{field: "roomNum", title: "Room #", width: "150px", attributes:{style:"text-align:center;"},editor: dateEditor}
 
 function dateEditor(container, options) {
      $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '"/>')
      .appendTo(container)
      .kendoMaskedTextBox({
          change: function(e){
              var model = options.model;
              assignRoom(model);
             console.log('options-->', options);
          }
      });
};

 

var assignRoom = function(obj) {
        angular.forEach($scope.gridSource.data(), function(v, k) {
            if (v.roomNum === obj.roomNum) {
                if (v.rsvDtlsId !== obj.rsvDtlsId) {
                    v.roomNum = "";
                }
            }              
        });
        var idx = 0, delRoom = null;
        angular.forEach($scope.gridModel, function(v, k) {
            if (v.rsvDtlsId === obj.rsvDtlsId) {
                if (obj.roomNum === "") {
                    delRoom = v.roomNum;
                }
 
                v.roomNum = obj.roomNum;
                idx = k;
            }              
        });
 
        angular.forEach($scope.checkedModel.roomNum, function(v, k) {
            if (v === delRoom) {
                $scope.checkedModel.roomNum[k] = "";
            }              
        });
 
 
        angular.forEach($scope.assignModel, function(v, k) {
            if (v.roomNum === $scope.gridModel[idx].roomNum) {
                $scope.checkedModel.roomNum[idx] = v.roomNum;
            }              
        });
         
        $scope.saveEach(obj);
        $scope.$apply();
    };

kendoMaskedTextBox evnet을 통해 검도 그리드의 값을 변경하고 싶습니다. 그러나 엔터 이벤트가 작동하지 않습니다. 어떻게 변환합니까?

{field: "roomNum", title: "Room #", width: "150px", attributes:{style:"text-align:center;"},editor: dateEditor} 

 function dateEditor(container, options) {
      $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '"/>')
      .appendTo(container)
      .kendoMaskedTextBox({
          change: function(e){
              var model = options.model;
              assignRoom(model);
             console.log('options-->', options); 
          }
      }); 
};

kendoMaskedTextBox evnet을 통해 검도 그리드의 값을 변경하고 싶습니다. 그러나 엔터 이벤트가 작동하지 않습니다. 어떻게 변환합니까?

{field: "roomNum", title: "Room #", width: "150px", attributes:{style:"text-align:center;"},editor: dateEditor} 

 function dateEditor(container, options) {
      $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '"/>')
      .appendTo(container)
      .kendoMaskedTextBox({
          change: function(e){
              var model = options.model;
              assignRoom(model);
             console.log('options-->', options); 
          }
      }); 
};

kendoMaskedTextBox evnet을 통해 검도 그리드의 값을 변경하고 싶습니다. 그러나 엔터 이벤트가 작동하지 않습니다. 어떻게 변환합니까?

{field: "roomNum", title: "Room #", width: "150px", attributes:{style:"text-align:center;"},editor: dateEditor} 

 function dateEditor(container, options) {
      $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '"/>')
      .appendTo(container)
      .kendoMaskedTextBox({
          change: function(e){
              var model = options.model;
              assignRoom(model);
             console.log('options-->', options); 
          }
      }); 
};

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 18 May 2017, 02:43 PM
Hi Jh-ho,


Please note that the official language we use for support is English. Would you send your question in English? This way we would be better understand your query and assist you in resolving it.


Regards,
Georgi
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MaskedTextBox
Asked by
주호
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or