Posted 26 March 2021, 1:32 am EST
Hi,
Could you tell me where i can find a full example of a WjFlexGrid using Angular Reactive Forms (https://angular.io/guide/reactive-forms) :
FormArrayName, FormGroup …
Thank’s in advance.
Jonathan.
Forums Home / Wijmo / General Discussion
Posted by: jgallais on 26 March 2021, 1:32 am EST
Posted 26 March 2021, 1:32 am EST
Hi,
Could you tell me where i can find a full example of a WjFlexGrid using Angular Reactive Forms (https://angular.io/guide/reactive-forms) :
FormArrayName, FormGroup …
Thank’s in advance.
Jonathan.
Posted 29 March 2021, 8:54 pm EST
Hi Jonathan,
We would not recommend using reactive forms with FlexGrid because reactive forms are single value elements in which they store and validate single values like a simple string, number, or date. But FlexGrid is a 2-dimensional structure that binds itself to an array of objects which do not work with reactive forms properly.
Can you please let us know your use case so that we may provide you with an alternate solution?
Regards,
Ashwin
Posted 30 April 2021, 3:02 am EST
Hi,
Sorry for the response’s delay.
I’m trying to implement à form in wich i’ve got an item A wich contain A list of B.
The implémentation of Reactive form give me a formGroup with a formArray. This formArray containt a list of formGroup for each Item. So, for me it’s ok about the 2-dimensional structure. What are the other solution, to visualize the errors on the cells ?
Thank’s in advance.
Jonathan.
Posted 2 May 2021, 3:32 pm EST
Hello Jonathan,
You can use the getError property of CollectionView. This property takes a function with the current item being validated as the parameter and returns the error message if any.
You can refer to the demo link below for reference:
https://www.grapecity.com/wijmo/demos/Core/CollectionView/EditingViews/Validation/angular
~regards