作成日: 2019/07/30 最終更新日: 2019/07/30
文書種別
使用方法
詳細
ヘッダ(固定行/列)の左上のセル(コーナーヘッダセル)に任意の文字列を表示するには、CellFactoryを継承するクラスを作成し、CreateTopLeftContentメソッドを下記のようにオーバーライドします。
◎サンプルコード(C#)
◎サンプルコード(C#)
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
_flexgrid.CellFactory = new MyFactory();
}
}
public class MyFactory: C1.WPF.FlexGrid.CellFactory
{
public override void CreateTopLeftContent(C1FlexGrid grid, Border bdr, CellRange rng)
{
base.CreateTopLeftContent(grid, bdr, rng);
TextBlock tb = new TextBlock();
tb.Text = "サンプルテキスト";
bdr.Child = tb;
}
}
{
public MainWindow()
{
InitializeComponent();
_flexgrid.CellFactory = new MyFactory();
}
}
public class MyFactory: C1.WPF.FlexGrid.CellFactory
{
public override void CreateTopLeftContent(C1FlexGrid grid, Border bdr, CellRange rng)
{
base.CreateTopLeftContent(grid, bdr, rng);
TextBlock tb = new TextBlock();
tb.Text = "サンプルテキスト";
bdr.Child = tb;
}
}
旧文書番号
84334