Validate the sum of grid column

Dear support;

I have a grid contains 2 columns

1-Name as sting

2-Percentage as decimal

Now I want to validate the totals rows of the Percentage column and if it is not 100 then I want to show message to the user that the total percentage must be 100, and then cancel the editing and stay in the row cell that edited.

Could you kindly please help me in this issue.

Thank you very much.

Best Regards


1 Reply

VN Vignesh Natarajan Syncfusion Team December 27, 2021 06:58 AM UTC

Hi Tarik,  
 
Thanks for contacting Syncfusion support.  
 
Query: “Now I want to validate the totals rows of the Percentage column and if it is not 100 then I want to show message to the user that the total percentage must be 100, and then cancel the editing and stay in the row cell that edited. 
 
We suggest you to achieve your requirement using Column Validation feature of Grid. We have built-in validation support to check for validation and throw error on fail. Error message will be displayed in tooltip. Since you want to compare the total value of column, we suggest you to use Custom validation feature of Grid.  
 
Refer the below UG documentation for your reference 
 
 
Please get back to us if you have further queries.  
 
Regards, 
Vignesh Natarajan 


Loader.
Up arrow icon