Spread for ASP.NET 7.0 Product Documentation
Items Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > ListBoxCellType Class : Items Property


Glossary Item Box

Gets or sets a string array of items for the list box list.

Syntax

Visual Basic (Declaration) 
Public Overridable Property Items As String()
Visual Basic (Usage)Copy Code
Dim instance As ListBoxCellType
Dim value() As String
 
instance.Items = value
 
value = instance.Items
C# 
public virtual string[] Items {get; set;}

Property Value

String array containing items for the list

Example

This example creates a ListBoxCellType Object and assigns it to the first cell in the sheet. An array of items for the list and the values for the corresponding items are supplied. The background and foreground colors of the selected item are defined and the value of the cell is set to the third item in the list.
C#Copy Code
string[]lbstr;
lbstr=new String[]{"Carbon","Oxygen","Hydrogen"};
string[]strval;
strval=new String[]{"1","2","3"};
FarPoint.Web.Spread.ListBoxCellType lbcell=new FarPoint.Web.Spread.ListBoxCellType();
lbcell.SelectedBackColor=Color.Yellow;
lbcell.SelectedForeColor=Color.DarkBlue;
lbcell.Items=lbstr;
lbcell.Values=strval;
FpSpread1.ActiveSheetView.Cells[0,0].CellType=lbcell;
FpSpread1.ActiveSheetView.SetValue(0,0,"3");
FpSpread1.ActiveSheetView.Rows[0].Height=140;
Visual BasicCopy Code
Dim lbstr As String()
lbstr=New String(){"Carbon","Oxygen","Hydrogen"}
Dim strval As String()
strval=New String(){"1","2","3"}
Dim lbcell As New FarPoint.Web.Spread.ListBoxCellType(lbstr,strval)
lbcell.SelectedBackColor=Color.Yellow
lbcell.SelectedForeColor=Color.DarkBlue
lbcell.Items=lbstr
lbcell.Values=strval
FpSpread1.ActiveSheetView.Cells(0,0).CellType=lbcell
FpSpread1.ActiveSheetView.SetValue(0,0,"3")
FpSpread1.ActiveSheetView.Rows(0).Height=140

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

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