Click or drag to resize

ExtensionMethodsPasteCells Method

Replaces the selected cells with the data. Cell selection and the data table must have matching dimensions, either 1:n, n:1 or n:x*n.

Namespace:  DataGridExtensions
Assembly:  DataGridExtensions (in DataGridExtensions.dll)
Syntax
public static bool PasteCells(
	this DataGrid dataGrid,
	IList<IList<string>> data
)

Parameters

dataGrid
Type: System.Windows.ControlsDataGrid
The data grid.
data
Type: System.Collections.GenericIListIListString
The data.

Return Value

Type: Boolean
true if the dimensions of data and cell selection did match and the cells data has been replaced; otherwise false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataGrid. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
The cell selection is assumed to be a rectangular area.
See Also