列フッタセクションの追加
コーディングで列ヘッダを追加するには、ColumnFooterSectionクラスのインスタンスを作成し、ColumnFooterSectionCollection.Addメソッドを使用します。
Imports GrapeCity.Win.MultiRow Dim Template1 As Template = New Template() Dim ColumnHeaderSection1 As ColumnHeaderSection = new ColumnHeaderSection() Dim ColumnHeaderCell1 As ColumnHeaderCell = New ColumnHeaderCell() ColumnHeaderCell1.Location = New Point(0, 0) ColumnHeaderCell1.Value = "列1" ColumnHeaderSection1.Cells.Add(ColumnHeaderCell1) ColumnHeaderSection1.Height = ColumnHeaderCell1.Height Dim TextBoxCell1 As TextBoxCell = New TextBoxCell() TextBoxCell1.Name = "TextBoxCell1" TextBoxCell1.Location = New Point(0, 0) Dim columnFooterSection As ColumnFooterSection = new ColumnFooterSection() Dim headerCell1 As HeaderCell = new HeaderCell() headerCell1.Location = New Point(0, 0) headerCell1.Value = "フッタ" columnFooterSection.Cells.Add(headerCell1) columnFooterSection.Height = headerCell1.Height Template1.Width = TextBoxCell1.Width Template1.Row.Cells.Add(TextBoxCell1) Template1.Row.Height = TextBoxCell1.Height Template1.ColumnHeaders.Add(ColumnHeaderSection1) Template1.ColumnFooters.Add(columnFooterSection) GcMultiRow1.Template = Template1 GcMultiRow1.RowCount = 10
using GrapeCity.Win.MultiRow; Template template = new Template(); ColumnHeaderSection columnHeaderSection1 = new ColumnHeaderSection(); ColumnHeaderCell columnHeaderCell1 = new ColumnHeaderCell(); columnHeaderCell1.Location = new Point(0, 0); columnHeaderCell1.Value = "列1"; columnHeaderSection1.Cells.Add(columnHeaderCell1); columnHeaderSection1.Height = columnHeaderCell1.Height; TextBoxCell textBoxCell1 = new TextBoxCell(); textBoxCell1.Name = "textBoxCell1"; textBoxCell1.Location = new Point(0, 0); ColumnFooterSection columnFooterSection = new ColumnFooterSection(); HeaderCell headerCell1 = new HeaderCell(); headerCell1.Location = new Point(0, 0); headerCell1.Value = "フッタ"; columnFooterSection.Cells.Add(headerCell1); columnFooterSection.Height = headerCell1.Height; template.Width = textBoxCell1.Width; template.Row.Cells.Add(textBoxCell1); template.Row.Height = textBoxCell1.Height; template.ColumnHeaders.Add(columnHeaderSection1); template.ColumnFooters.Add(columnFooterSection); gcMultiRow1.Template = template; gcMultiRow1.RowCount = 10;
列フッタセクションの削除
列フッタセクションを削除するには、ColumnFooterSectionCollection.RemoveまたはRemoveAtメソッドを使用します。