如何同时编辑GridView和DetailsView [英] How do I could edit at the same time the GridView and DetailsView
问题描述
我正在使用detailsView和GridView,在DetailsView中我有ModeChanging事件,允许字段可编辑,我喜欢当我点击修改按钮时也允许编辑GridView字段而不是AutoGenerateEditbutton属性,这样我可以同时编辑DetailsView和GridView。
这可能吗?
谢谢。
I´m working with a detailsView ans a GridView, within the DetailsView I have the ModeChanging event that allows the fields to be editable, I´d like that when I click on the modify button also allows edit the GridView fields without of the AutoGenerateEditbutton attribute, so that with this I could edit at the same time the DetailsView and GridView.
Is this possible?
thanks.
推荐答案
请参阅 - GridView.AutoGenerateEditButton Property [ ^ ]
Refer - GridView.AutoGenerateEditButton Property[^]
通过使用行的索引设置EditIndex属性,可以以编程方式将行置于编辑模式。要以编程方式退出编辑模式,请将EditIndex属性设置为-1。
You can programmatically put a row in edit mode by setting the EditIndex property with the index of the row. To programmatically exit edit mode, set the EditIndex property to -1.
这篇关于如何同时编辑GridView和DetailsView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!