Use the Remove method to remove a row item representing an individual row properties object for a multi-editor row from the row's MultiEditorRow.PropertiesCollection at the specified position.
Elements following the removed element move up to occupy the vacated area. The indexes of the moved elements are updated.
Note that the VGridControlBase.RowChanged event occurs each time after a row item is successfully removed from the collection. The event parameter's RowChangedEventArgs.ChangeType property representing the type of row processing performed returns the RowChangeTypeEnum.PropertiesDeleted value.
If you wish to remove a specifc row item from the collection, use the Remove method. All row items can be removed from the collection by using the Clear method.
You can use the Add method to add new row item objects to the collection. Existing row items can be added to the collection with the help of the AddRange method.

Example
The example below represents a function that uses the RemoveAt method and Count property to remove the last row item from the MultiEditorRow.PropertiesCollection of a multi-editor row.
C# |
private bool RemoveLastRowItem(BaseRow row) {
if (row.XtraRowTypeID != 2) return false;
MultiEditorRowPropertiesCollection propsCollection =
(row as MultiEditorRow).PropertiesCollection;
if (propsCollection.Count == 0) return false;
propsCollection.RemoveAt(propsCollection.Count - 1);
return true;
}
|
VB |
Private Function RemoveLastRowItem(ByVal Row As BaseRow)
If Row.XtraRowTypeID <> 2 Then Return False
Dim PropsCollection As MultiEditorRowPropertiesCollection = _
CType(Row, MultiEditorRow).PropertiesCollection
If PropsCollection.Count = 0 Then Return False
PropsCollection.RemoveAt(PropsCollection.Count - 1)
Return True
End Function
|