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

Hi,

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

<e-columns>
            <e-column
                field="ipAddress" headerText="IP Address" [validationRules]="ipAddressRule" [allowEditing]="true">
            </e-column>
        </e-columns>


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


Regards,

Rajapandi R


Loader.
Live Chat Icon For mobile
Up arrow icon