Free Support Forum - aspose.com

How to define the CustomValidation in WebGrid?

i saw in wiki like that :

public class CustomValidation : Aspose.Grid.Desktop.ICustomValidation

can we have the same usage in WebGrid to validate the input in WebGrid ?


Hi,

The current version GridWeb doesn't support custom validation. The new version which will be released at earlier next month enhances validation features. It includes some new validation types: Number, Interger, Date, DateTime, FreeList, Boolean and CustomFunction.

Please wait for that. Thank you.

thank u

and i want to display the message (or alert of javascript, etc.) when the validation is False, how to do that ?

Hi idfactory,

Please consider this solution: We add a property OnSubmitValidationErrorClientFunction to the GridWeb. It means a client javascript function name. When user click a button to submit the Grid and there are any validation error, the control will call this function. The function may do something like displaying a message. But I think this will bring a new question. The control may contain many validation cells. If there are more than one error, how to display these errors? Maybe you just want to display a simple message "There are errors!".

Please tell us your opinion about this solution.

Thank you.

in the future i need getting more error messages from differant validations, but now just one message is enough.


thank you

OK, we will add this feature to the next release.

Thank you.