作成日: 2017/03/29 最終更新日: 2017/03/29
文書種別
使用方法
詳細
SPREADのセルをコマンドボタン型セル(チェックボックス型セル)に設定した場合は、セルのTextプロパティの設定はコマンドボタン(チェックボックス型セル)のテキストには適用されません。コマンドボタンのテキストはコマンドボタン型セル(チェックボックス型セル)オブジェクトのTextプロパティに設定してください。
◎サンプルコード(VB)
◎サンプルコード(C#)
◎サンプルコード(VB)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack Then
Return
End If
Dim btnCell As New FarPoint.Web.Spread.ButtonCellType
btnCell.CommandName = "A1button"
btnCell.Text = "ボタン"
FpSpread1.Sheets(0).Cells(0, 0).CellType = btnCell
Dim ck As New FarPoint.Web.Spread.CheckBoxCellType
ck.Text = "True/False"
FpSpread1.ActiveSheetView.Cells(0, 1).CellType = ck
End Sub
If IsPostBack Then
Return
End If
Dim btnCell As New FarPoint.Web.Spread.ButtonCellType
btnCell.CommandName = "A1button"
btnCell.Text = "ボタン"
FpSpread1.Sheets(0).Cells(0, 0).CellType = btnCell
Dim ck As New FarPoint.Web.Spread.CheckBoxCellType
ck.Text = "True/False"
FpSpread1.ActiveSheetView.Cells(0, 1).CellType = ck
End Sub
◎サンプルコード(C#)
protected void Page_Load(object sender, EventArgs e)
{
if(Page.IsPostBack)
{
return;
}
FarPoint.Web.Spread.ButtonCellType btnCell = new FarPoint.Web.Spread.ButtonCellType();
btnCell.CommandName = "A1button";
btnCell.Text = "ボタン";
FpSpread1.ActiveSheetView.Cells[0,0].CellType = btnCell;
FarPoint.Web.Spread.CheckBoxCellType ck = new FarPoint.Web.Spread.CheckBoxCellType();
ck.Text = "True/False";
FpSpread1.ActiveSheetView.Cells[0,1].CellType = ck;
}
{
if(Page.IsPostBack)
{
return;
}
FarPoint.Web.Spread.ButtonCellType btnCell = new FarPoint.Web.Spread.ButtonCellType();
btnCell.CommandName = "A1button";
btnCell.Text = "ボタン";
FpSpread1.ActiveSheetView.Cells[0,0].CellType = btnCell;
FarPoint.Web.Spread.CheckBoxCellType ck = new FarPoint.Web.Spread.CheckBoxCellType();
ck.Text = "True/False";
FpSpread1.ActiveSheetView.Cells[0,1].CellType = ck;
}
旧文書番号
40229