除非所有字段都存在,否则“详细信息视图更新”命令不会更新!
我有一个页面将数据从数据库绑定到详细信息视图。
我想使用自动生成的更新命令。
一切顺利,更新也成功,但如果我删除任何我不想有机会更新的字段,则更新命令不会更新!旧价值观保留!
我的意思是:如果所有字段都存在于详细信息视图中,则更新将正常,否则,更新将不会更新任何内容。
我尝试将我不想查看的字段标记为“Visible = 'false'”,但没有好的结果!
我怎样才能隐藏一些字段?
谢谢 :)
I have a page that binds data from DB to a DetailsView.
I want to use the auto-generated Update command.
Everything went OK, and also updating was successful, but if I remove any field that I don't want to have chance to update, then the Update command doesn't update! the old values retain!
I mean: if all of the fields are present in the detailsView, the update will be OK, otherwise, the update will NOT update any thing.
I've tried to mark the fields that I don't want to view as "Visible = 'false'" but with no good results!
How could I hide some fields?
Thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试将不想更新的字段也设置为“ReadOnly = True”?这应该将它们标记为不更新。
Did you try to put the field you don't want to update at 'ReadOnly = True' too? This should mark them as to not be updated.
这是一种方法。
Here is a way of doing it..