public errorGridActionBegin(args: any, context: any) {
if (args.requestType == 'beginEdit') {
let editCellType: Object = {
'dropdownedit': DropDownEditCell, 'numericedit': NumericEditCell,
'datepickeredit': DatePickerEditCell, 'defaultedit': DefaultEditCell,
'comboboxedit': ComboboxEditCell
}
let col: Column = context.getColumnByField('correctedData');
let validation = context.context.dataFileFields.find(_ => _.propertyName == args.rowData.field);
if (validation != undefined) {
col.validationRules = {
range: [validation.rangeMin, validation.rangeMax]
}
}
if (args.rowData.field == 'PointId') {
col.editType = 'dropdownedit';
//col.dataSource = context.context.points;
/*
col.edit.params = {
dataSource: context.context.points,
fields: { value: 'type', text: 'type' }
};
*/
/* col.edit.params = {
dataSource: ['test 1', 'test 2'],
placeholder: 'arjuna',
value: args.rowData.correctedData
};*/
} else {
col.editType = 'numericedit';
}
col.edit.params = {
dataSource: ['test 1', 'test 2'],
placeholder: 'arjuna'
};
col.edit = extend(
new editCellType[col.editType && editCellType[col.editType] ?
col.editType : 'defaultedit'](context, context.serviceLocator),
col.edit || {});
/*col.edit.params = {
min: 0,
max: 10
}*/
/*col.validationRules = {
range: [0,10]
}*/
}
}