DataColumnSelectionConverter.GetStandardValues(ITypeDescriptorContext) 方法


返回可以分配给关联控件属性的可用值的列表。Returns a list of available values that can be assigned to the associated control property.

 override System::ComponentModel::TypeConverter::StandardValuesCollection ^ GetStandardValues(System::ComponentModel::ITypeDescriptorContext ^ context);
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues (System.ComponentModel.ITypeDescriptorContext context);
override this.GetStandardValues : System.ComponentModel.ITypeDescriptorContext -> System.ComponentModel.TypeConverter.StandardValuesCollection
Public Overrides Function GetStandardValues (context As ITypeDescriptorContext) As TypeConverter.StandardValuesCollection



可用于获取附加上下文信息的 ITypeDescriptorContext 实现。An ITypeDescriptorContext implementation that can be used to gain additional context information.


一个 TypeConverter.StandardValuesCollection 实例,包含可以分配给关联控件属性的可用值。A TypeConverter.StandardValuesCollection instance containing available values for assignment to the associated control property.


GetStandardValues 方法使用指定 context 对象的 Instance 属性来获取 IComponent 实现。The GetStandardValues method uses the Instance property of the specified context object to obtain an IComponent implementation. 如果 IComponent 实现可用,它将用于在设计时访问关联的控件,并从关联的 GridView 组件中检索可用值的列表。If the IComponent implementation is available, it is used to access the associated control at design time and retrieve the list of available values from the associated GridView component.

可用值的集合是从 GridView 控件中的绑定列字段生成的。The collection of available values is built from the bound column fields in the GridView control. 绑定列字段由 Columns 集合中的 BoundField 对象以及为数据源中的字段自动生成的绑定列字段组成。The bound column fields consist of BoundField objects in the Columns collection, and from the bound column fields automatically generated for fields in the data source.