Insert Method
Description
Inserts a new record/row at the specified position in the collection of records.
Syntax
Public Function Insert( _
ByVal [Index](#) As Long _
) As [GridRecord](XtremeGridControl~GridRecord.md)
Parameters
- Index: The position in the collection of records to insert this record.
Return Type
A reference to the record inserted at the value of Index.
Remarks
Insert will create a new record at the specified index. To move an existing GridRecord, use the InsertAt method.
Example
This sample illustrates how to use the Insert method to add a new record/row in a specific row.
Dim Record As GridRecord
Dim Item As GridRecordItem
' Inserts a new Record/Row in the 6th row of the GridControl
Set Record = wndGridControl.Records.Insert(5)
Set Item = Record.AddItem("")
Item.HasCheckbox = True
Item.Checked = False
Record.AddItem "RE: Your Invoice"
Record.AddItem "John Smith"
Record.AddItem "19/06/2004"
Record.AddItem "18k"
wndGridControl.Populate
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.