We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to add ipaddress validation in Grid batch edit mode


How can we add the ipaddress validation in batch edit mode?

Component TS

  ngOnInit(): void {
    this.editSettings = {allowEditing: true, allowAdding: true, allowDeleting: true, mode: 'Batch', };
    this.toolbar = ['Add','Delete', 'Update', 'Cancel'];
    this.filterOptions = { type: "Menu" };
    this.ipAddressRule = {required: true };

Component HTML

                field="ipAddress" headerText="IP Address" [validationRules]="ipAddressRule" [allowEditing]="true">

1 Reply

RR Rajapandi Ravi Syncfusion Team March 30, 2023 02:03 PM UTC

Hi Hor,

Greetings from Syncfusion support

You can define your own custom validation rules for the specific columns by using Form Validator custom rules. We have already discussed this requirement in our documentation, so please refer the below document and you can write your own custom rules based on your requirement.

Documentation: https://ej2.syncfusion.com/angular/documentation/grid/editing/validation#custom-validation


Rajapandi R

Live Chat Icon For mobile
Up arrow icon