Spread ASP.NET 6.0 Product Documentation
Values Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > ListBoxCellType Class : Values Property


Glossary Item Box

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

Syntax

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

Property Value

String array containing the values corresponding to the items in the list

Remarks

This property is available at run time only.

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=newString[]{"Carbon","Oxygen","Hydrogen"};
string[]strval;
strval=newString[]{"1","2","3"};
FarPoint.Web.Spread.ListBoxCellTypelbcell=newFarPoint.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
DimlbstrAsString()
lbstr=NewString(){"Carbon","Oxygen","Hydrogen"}
DimstrvalAsString()
strval=NewString(){"1","2","3"}
DimlbcellAsNewFarPoint.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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.