1

I am quite new to ag-grid.

We are using ag-grid Angular version. All of our cells are editable in grid and there are approx more than 3000 cells.

Having an Angular form for grid and form control for each cell seems to make grid lot slower. specially while generating all form controls on load and before submitting form when all form control's validity is updated.

Has anyone found a better way to perform ag-grid cell validation with Angular?

Thank for any help.

un.spike
  • 4,857
  • 2
  • 18
  • 38
kashpatel
  • 696
  • 1
  • 6
  • 18
  • 1
    Possible duplicate of [AG Grid: Better way for validation row - valueSetter?](https://stackoverflow.com/questions/52710350/ag-grid-better-way-for-validation-row-valuesetter) – un.spike Dec 12 '18 at 19:41
  • Thanks @un.spike. Not exactly sure if we can get away with just using valueSetter since our validation flow is too complex and also include warnings in some cases. Appreciated help though. Thanks. – kashpatel Dec 14 '18 at 20:07

1 Answers1

1

In the ag-Grid documentation, data validation is suggested with a custom Cell Editor. In the cell editor component you can perform data validation on the cell input directly. Perhaps this gives you better performance than the Angular Form control.

See the "Numeric" column example on their website: https://www.ag-grid.com/example-angular-editor/

Superman.Lopez
  • 1,332
  • 2
  • 11
  • 38