ag-grid-validation

How to implement validation rules for ag-grid row edit

删除回忆录丶 提交于 2019-12-24 19:34:55
问题 I currently have html table with inline editing that uses plain Angular Reactive Forms, including a lot of validation rules: var formArray = new FormArray(this.items.map(createItemFormGroup)); createItemFormGroup(item){ return new FormGroup({ prop1: new FormControl(item.prop1, [Validators.required, Validators.min(1)]) prop2:... }) } Is there any example of how to integrate ag-grid with Angular validations? The requirement is, that I need to highlight invalid cell values. I don't necessarily

AG Grid: Better way for validation row - valueSetter?

偶尔善良 提交于 2019-12-18 07:24:29
问题 Is there a better way to validate a row in ag-grid than with valueSetter ? I can achieve the validation with that but I am not sure, if there is a better way. https://www.ag-grid.com/javascript-grid-value-setters/#properties-for-setters-and-parsers I want to validate two fields in the row. DateFrom and DateUntil (they are not allow to be null and DateFrom must be lower than DateUntil). 回答1: There are two ways of possible validation handling: First: via ValueSetter function and Second: via

AG Grid: Better way for validation row - valueSetter?

瘦欲@ 提交于 2019-11-29 12:55:11
Is there a better way to validate a row in ag-grid than with valueSetter ? I can achieve the validation with that but I am not sure, if there is a better way. https://www.ag-grid.com/javascript-grid-value-setters/#properties-for-setters-and-parsers I want to validate two fields in the row. DateFrom and DateUntil (they are not allow to be null and DateFrom must be lower than DateUntil). There are two ways of possible validation handling: First: via ValueSetter function and Second: via custom cellEditor component I suggest that it would be better to split the logic between custom components ,