Using Form Validation for input inside FlexGrid cell template

Posted by: germiep.fernandez on 23 February 2022, 4:28 am EST

  • Posted 23 February 2022, 4:28 am EST

    Hi,

    Is it possible to do add a form validation to the cell templates inside the FlexGrid. I have a flexgrid like this:

    
    	<wj-flex-grid
    		[itemsSource]="data"
    		[headersVisibility]="'Column'"
    	>
    		<wj-flex-grid-column header="Report Date">
    			<ng-template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
    				<wj-input-date format="yyyy/MM/dd"></wj-input-date>
    			<ng-template>
    		</wj-flex-grid-column>
    	</wj-flex-grid>
    
    

    and I want to check if the user inputted a value on the fields inside the grid.

  • Posted 24 February 2022, 12:20 pm EST

    Hi,

    The InputDate is by default is required. And in this case, as per the code, the cell would have a valid value as per the code.

    Also, please elaborate your requirement. As per the code snippet, you are trying to add the editor for the cell that do not have binding. Please share the use case for further assistance.

    Could you please share the modified sample with your issue ?

    https://jscodemine.grapecity.com/share/gOC6oBUbkkOtCpm2MSC64g/

    Regards,

    Manish Gupta

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels