Spread Windows Forms 6.0 Product Documentation
RemoveItem Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > ComboBoxCellType Class : RemoveItem Method


index
Index of item to remove

Glossary Item Box

Removes the individual item specified by index from the list.

Syntax

Visual Basic (Declaration) 
Public Sub RemoveItem( _
   ByVal index As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As ComboBoxCellType
Dim index As Integer
 
instance.RemoveItem(index)
C# 
public void RemoveItem( 
   int index
)

Parameters

index
Index of item to remove

Example

Visual BasicCopy Code
Dim cmbocell As New FarPoint.Win.Spread.CellType.ComboBoxCellType()
Dim list As New ListBox()
Dim dlg As DialogResult
cmbocell.Items() = (New String() {"One", "Two", "Three", "Four", "Five"})
FpSpread1.ActiveSheet.Cells(0, 0).CellType = cmbocell
dlg = MessageBox.Show("Do you want to remove the item?", "RemoveItem", MessageBoxButtons.YesNo)
If dlg = DialogResult.Yes Then
     cmbocell.RemoveItem(2)
End If
C#Copy Code
FarPoint.Win.Spread.CellType.ComboBoxCellType cmbocell = new FarPoint.Win.Spread.CellType.ComboBoxCellType();
DialogResult dlg;
cmbocell.Items = (new String[] {"One", "Two", "Three", "Four", "Five"});
fpSpread1.ActiveSheet.Cells[0, 0].CellType = cmbocell;
dlg = MessageBox.Show("Do you want to remove the item?", "RemoveItem", MessageBoxButtons.YesNo);
if (dlg == DialogResult.Yes)
{
     cmbocell.RemoveItem(2);
}

Requirements

Target Platforms: 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

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.