DataGridViewButtonColumn.Clone Method ()

 

Creates an exact copy of this column.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public override object Clone()

Return Value

Type: System.Object

An Object that represents the cloned DataGridViewButtonColumn.

Exception Condition
InvalidOperationException

The value of the CellTemplate property is null.

Use this method to duplicate a column of button cells.

Notes to Inheritors:

When overriding Clone in a derived class, call the base class's Clone method so that the properties of the base class are copied to the new cell, and be sure to also copy the values of any properties that were added to the derived class.

.NET Framework
Available since 2.0
Return to top
Show: