SPREAD for ASP.NET 8.0J サンプルコード集
コードでチェックボックスをチェックする

CellクラスのValueプロパティに、チェックボックスの値を設定します。

実行例:

CheckBoxCellType checkCell = new CheckBoxCellType();
FpSpread1.Cells[0, 1].CellType = checkCell;
//チェックボックス型セルに値を設定します
FpSpread1.Cells[0, 1].Value = true;
Dim checkCell As New CheckBoxCellType()
FpSpread1.Cells(0, 1).CellType = checkCell
'チェックボックス型セルに値を設定します
FpSpread1.Cells(0, 1).Value = True

クライアント側で処理することもできます。

CheckBoxCellType checkCell = new CheckBoxCellType();
FpSpread1.Cells[0, 1].CellType = checkCell;
Dim checkCell As New CheckBoxCellType()
FpSpread1.Cells(0, 1).CellType = checkCell
<script type="text/javascript">
     window.onload = function () {
         var spread = document.getElementById("FpSpread1");
         spread.SetValue(0, 1, true);
     }
</script>

 

 


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