How to remove ValidationGroup attribute in backstage?

222 views Asked by At

Now i have two buttons that contain attributes "ValidationGroup='Group1'".And there will only one button can be displayed when page load(based on some conditions).the problem is the onclick event can't be fired for the hidden button's validation. So how can i disable the validation group of the hidden buttons in backstage?

2

There are 2 answers

2
शेखर On

You can use CauseValidation proppery to overcome this issue as follows on your hidden button

 CausesValidation="False"
0
Magnetize On

My tip would be to use two separate validation groups, one for each button and then just disable the correct group by ValidationGroup1.Enabled = false;