Remove ClientScript on Save Button

Hi Aspose Team,

Our current solution has a column using dropdown validation. On save or submit action it will validate, if it has cells that are empty it won't push through to saving or submitting the form. Is it possible to remove the validation on the save button only? Submit action will have validation but on save it will save changes whether column is empty or not.

Thank you!

Regards,

Joyce

Hi,


Well, GridWeb has ForceValidation Boolean attribute which either enforces you to fill the required fields with relevant data for the data validations (set) or does not enforce. So if you put “false” for ForceValidation, both submit and save buttons would be equally affected.

Please add a line in Page_Load event after you have added DropDownList validation to disable enforcing data validations:
e.g
Sample code:

GridWeb1.ForceValidation = false;

Thank you.

Hi Amjad,

Thank you for the response. I was able to disable the validation but like what you said it affected both buttons. Is there a way to isolate the effect to the save button alone?

Regards,

Joyce

Hi,


Good to know that it works for you. And, I am afraid, as I told you earlier this will affect both buttons, apparently there is no way around to do it with one button alone.

Thank you.