从 GridView 行中删除RequiredFieldValidation
我有一个类似 Gridview 的 Excel 工作表。我用它来更新和插入新记录。最后一行用于插入,可以为空。我需要在更新或插入行时添加RequiredFieldValidation,但我想在整行为空时将其删除。这如何实施。
谢谢您的建议:)
Row1 [与瓦尔迪兹] N 行 [空时不验证]
I have a Gridview like excel sheet. I use it to update and insert new records. The last row is used for insertion and can be empty. I need to add RequiredFieldValidation for when rows are updated or inserted but I want to remove it when the whole row is empty. How can this be implemented.
Thank you for your suggestions :)
Row1
[WithValdations]
Row N
[No Validations when Empty]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果验证器添加了 Id,您可以从代码中引用这些 Id,并以编程方式打开和关闭验证器。
If the validators are added with Id's you can reference those Id's from code, and turn the validators on and off programmatically.