PowerTools SPREAD for ASP.NET 8.0J
ListItems プロパティ (ListBoxCellType)

項目のリストを取得または設定します。
構文
'Declaration
 
Public Property ListItems As ListItem()
public ListItem[] ListItems {get; set;}

プロパティ値

項目のリストを含む配列を表すListItem
解説
このプロパティは実行時のみ使用できます。
この例では、リストボックス型のセル型を作成し、それを3項目から成るシートの先頭セルに割り当て、3項目のうち、常に2項目を表示します。
  FarPoint.Web.Spread.ListBoxCellType list = new FarPoint.Web.Spread.ListBoxCellType();
FarPoint.Web.Spread.ListItem[] items = new FarPoint.Web.Spread.ListItem[3]; 
FarPoint.Web.Spread.ListItem item = new FarPoint.Web.Spread.ListItem(); 
item.Text = "First"; 
item.Value = "Gold"; 
items[0] = item; 
item = new FarPoint.Web.Spread.ListItem(); 
item.Text = "Second"; 
item.Value = "Silver"; 
items[1] = item; 
item = new FarPoint.Web.Spread.ListItem(); 
item.Text = "Third"; 
item.Value = "Bronze"; 
items[2] = item; 
list.ListItems = items;
  // number of items to display in list
list.Rows = 2;
FpSpread1.Sheets[0].Cells[0,0].CellType = list;
Dim list As New FarPoint.Web.Spread.ListBoxCellType()
Dim item As New FarPoint.Web.Spread.ListItem()
Dim items(3) As FarPoint.Web.Spread.ListItem
item.Text = "First"
item.Value = "Gold"
items(0) = item
item = New FarPoint.Web.Spread.ListItem()
item.Text = "Second"
 item.Value = "Silver"
items(1) = item
item = New FarPoint.Web.Spread.ListItem()
item.Text = "Third"
item.Value = "Bronze"
items(2) = item 
list.ListItems = items
' number of items to display in list
list.Rows = 2
FpSpread1.Sheets(0).Cells(0, 0).CellType = list
参照

ListBoxCellType クラス
ListBoxCellType メンバ

 

 


© 2003-2015, GrapeCity inc. All rights reserved.