DataGridColumnCollectionEditor 类

定义

为控件的 DataGrid 列集合提供编辑用户界面(UI)。

public ref class DataGridColumnCollectionEditor : System::Drawing::Design::UITypeEditor
public class DataGridColumnCollectionEditor : System.Drawing.Design.UITypeEditor
type DataGridColumnCollectionEditor = class
    inherit UITypeEditor
Public Class DataGridColumnCollectionEditor
Inherits UITypeEditor
继承
DataGridColumnCollectionEditor

示例

下面的代码示例使用将EditorAttribute类和DataGridColumnCollectionEditor类(集合编辑器的基类)与自定义UITypeEditor属性相关联Columns。 该属性是对类的 DataGridColumnCollection 引用。

private DataGridColumnCollection columns = null;

// Associate the DataGridColumnCollectionEditor with the TestColumns. 
[EditorAttribute(typeof(System.Web.UI.Design.WebControls.
   DataGridColumnCollectionEditor),
   typeof(UITypeEditor))]
public DataGridColumnCollection TestColumns
{
    get { return columns; }
} // TestColumns
Private columns As DataGridColumnCollection

' Associate DataGridColumnCollectionEditor with the TestColumns.
<EditorAttribute( GetType( System.Web.UI.Design.WebControls. _
    DataGridColumnCollectionEditor), _
    GetType(UITypeEditor))> _
Public ReadOnly Property TestColumns() As DataGridColumnCollection
    Get
        Return columns
    End Get
End Property ' TestColumns

构造函数

名称 说明
DataGridColumnCollectionEditor()

初始化 DataGridColumnCollectionEditor 类的新实例。

属性

名称 说明
IsDropDownResizable

获取一个值,该值指示用户是否应调整下拉列表编辑器的大小。

(继承自 UITypeEditor)

方法

名称 说明
EditValue(IServiceProvider, Object)

使用方法指示 GetEditStyle() 的编辑器样式编辑指定对象的值。

(继承自 UITypeEditor)
EditValue(ITypeDescriptorContext, IServiceProvider, Object)

使用指定的上下文描述符和服务提供程序编辑指定的值。

Equals(Object)

确定指定的对象是否等于当前对象。

(继承自 Object)
GetEditStyle()

获取方法使用的 EditValue(IServiceProvider, Object) 编辑器样式。

(继承自 UITypeEditor)
GetEditStyle(ITypeDescriptorContext)

使用指定的 ITypeDescriptorContext 对象获取与此编辑器关联的编辑样式。

GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetPaintValueSupported()

指示此编辑器是否支持绘制对象的值的表示形式。

(继承自 UITypeEditor)
GetPaintValueSupported(ITypeDescriptorContext)

指示指定上下文是否支持在指定上下文中绘制对象的值的表示形式。

(继承自 UITypeEditor)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
PaintValue(Object, Graphics, Rectangle)

将指定对象的值的表示形式绘制到指定的画布。

(继承自 UITypeEditor)
PaintValue(PaintValueEventArgs)

使用指定的 PaintValueEventArgs对象值绘制表示形式。

(继承自 UITypeEditor)
ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

适用于

另请参阅