简体   繁体   中英

How to remove ValidationGroup attribute in backstage?

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?

我的技巧是使用两个单独的验证组,每个按钮一个,然后通过ValidationGroup1.Enabled = false;禁用正确的组ValidationGroup1.Enabled = false;

您可以使用CauseValidation属性解决隐藏按钮上的此问题,如下所示

 CausesValidation="False"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM