Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
900
BatchUpdating validation
posted

Hi

Can you please let me know how to do following validation with BatchUpdating:

- Suppose Parent Row has a TotalWeight Column with Value 1000.
- There are 3 Child row in Band 1 with Weight Column.
- And before updating we need to validate that SUM for Weight Column of 3 Child row is equal to 1000.
- can we do this on Client Side script, just before Server side RowUpdating Event is called ?

Also, can you please send me a working sample with BatchUpdating and validation.

Thanks,
Shakti

  • 29417
    Suggested Answer
    Offline posted

    Hello shaktishekhar,

     

    Thank you for posting in our forum.

     

    If you’re using batch updating you could set a custom validator control for that columns of the grid.

    For example you could use a CustomValidator and define a ClientValidationFunction where you can check which rows have been updated and check the sum. You can define that the validator should validate a specific column from the grid by defining a new EditingColumnSetting in the CellEditing behavior. For example:

    <ig:EditingColumnSetting ColumnKey="Sum" ValidatorID="customValidator" />

    When there’s a postback triggered on the page the validation function will be fired. If the validation does not pass then the data will not be posted back to the server.

     Please refer to the attached sample and let me know if you have any questions.

     

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer II

    Infragistics, Inc.

    http://ko.infragistics.com/support

     

    WHDG_BatchUpdating_Validation.zip