作成日: 2017/05/16 最終更新日: 2017/05/16
文書種別
使用方法
詳細
セル型のEditorCssClassにて編集中セルのスタイルを設定することができます。以下のサンプルコードでは、編集時にセルの値が右寄せで表示されます。
◎サンプルコード(VB)
◎サンプルコード(C#)
◎サンプルコード(VB)
------------------------
Webフォームクラス
------------------------
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If IsPostBack Then
Return
End If
Dim gc As New FarPoint.Web.Spread.GeneralCellType()
gc.EditorCssClass = "CssStyle1"
FpSpread1.ActiveSheetView.Columns(0).CellType = gc
End Sub
-------------------------------
HTML
-------------------------------
<style type="text/css">
.CssStyle1 { text-align: right; }
</style>
Webフォームクラス
------------------------
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If IsPostBack Then
Return
End If
Dim gc As New FarPoint.Web.Spread.GeneralCellType()
gc.EditorCssClass = "CssStyle1"
FpSpread1.ActiveSheetView.Columns(0).CellType = gc
End Sub
-------------------------------
HTML
-------------------------------
<style type="text/css">
.CssStyle1 { text-align: right; }
</style>
◎サンプルコード(C#)
------------------------
Webフォームクラス
------------------------
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
return;
}
FarPoint.Web.Spread.GeneralCellType gc = new FarPoint.Web.Spread.GeneralCellType();
gc.EditorCssClass = "CssStyle1";
FpSpread1.ActiveSheetView.Columns[0].CellType = gc;
}
-------------------------------
HTML
-------------------------------
※VBと同じです
Webフォームクラス
------------------------
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
return;
}
FarPoint.Web.Spread.GeneralCellType gc = new FarPoint.Web.Spread.GeneralCellType();
gc.EditorCssClass = "CssStyle1";
FpSpread1.ActiveSheetView.Columns[0].CellType = gc;
}
-------------------------------
HTML
-------------------------------
※VBと同じです
旧文書番号
40358