ParameterCollectionEditor.EditValue(ITypeDescriptorContext, IServiceProvider, Object) 方法
定义
编辑关联的数据源控件的 ParameterCollection 对象的元素。Edits the elements of the ParameterCollection objects of the associated data source control.
public:
override System::Object ^ EditValue(System::ComponentModel::ITypeDescriptorContext ^ context, IServiceProvider ^ provider, System::Object ^ value);
public override object EditValue (System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value);
override this.EditValue : System.ComponentModel.ITypeDescriptorContext * IServiceProvider * obj -> obj
Public Overrides Function EditValue (context As ITypeDescriptorContext, provider As IServiceProvider, value As Object) As Object
参数
- context
- ITypeDescriptorContext
用于获取上下文信息的 ITypeDescriptorContext 对象。An ITypeDescriptorContext object used to acquire context information.
- provider
- IServiceProvider
实现 IServiceProvider 的对象,通过前者可以获取编辑服务。An object implementing the IServiceProvider through which editing services can be obtained.
- value
- Object
要编辑其值的对象。The object to edit the value for.
返回
新的 value;否则,如果对象的值未发生更改,则 value 不会更改。The new value; otherwise, if the value of the object has not changed, value unchanged.
例外
value 为 null。value is null.
注解
EditValue方法从参数中提取关联的数据源控件和与该控件关联的数据源控件设计器 context 。The EditValue method extracts the associated data source control and the data source control designer that is associated with that control from the context parameter. 支持的数据源控件包含 ObjectDataSource 和 SqlDataSource 控件,以及其对应的 ObjectDataSourceDesigner 和 SqlDataSourceDesigner 设计器。The supported data source controls include the ObjectDataSource and SqlDataSource controls, with their corresponding ObjectDataSourceDesigner and SqlDataSourceDesigner designers.
提取数据后, EditValue 调用数据源控件设计器,以显示一个编辑对话框,该对话框用于编辑 ParameterCollection 数据源控件的一个属性所引用的对象 Parameters 。Once the data is extracted, the EditValue calls back to the data source control designer to display an editing dialog box that is used to edit a ParameterCollection object that is referenced by one of the Parameters properties of the data source control.