Xceed DataGrid for WPF v7.2 Documentation
InsertItem Method (CellCollection)


Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace > CellCollection Class : InsertItem Method
The zero-based index at which to insert item.
The cell to insert. Cannot be a null reference (Nothing in Visual Basic).
Inserts a cell at the specified index.
Syntax
'Declaration
 
Protected Overrides Sub InsertItem( _

   ByVal index As Integer, _

   ByVal item As Cell _

) 
'Usage
 
Dim instance As CellCollection

Dim index As Integer

Dim item As Cell

 

instance.InsertItem(index, item)
protected override void InsertItem( 

   int index,

   Cell item

)

Parameters

index
The zero-based index at which to insert item.
item
The cell to insert. Cannot be a null reference (Nothing in Visual Basic).
Exceptions
ExceptionDescription
An attempt was made to insert a cell when the row is contained by a DataGridControl.
item is a null reference (Nothing in Visual Basic).
Remarks
This method will raise the CollectionChanged event.
Requirements

Target Platforms: Windows 11, Windows, 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

CellCollection Class
CellCollection Members
Base Implementation in InsertItem

Methods

RemoveItem Method
MoveItem Method
SetItem Method