作成日: 2022/03/11 最終更新日: 2022/03/30
文書種別
使用方法
詳細
ExpandメソッドおよびCollapseメソッドを使用して列の表示/非表示を切り替えることができます。
[Visual Basic]
[C#]
[Visual Basic]
Imports GrapeCity.Win.MultiRow
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim textBoxCell1 As TextBoxCell = New TextBoxCell()
textBoxCell1.Name = "textBoxCell1"
Dim textBoxCell2 As TextBoxCell = New TextBoxCell()
textBoxCell2.Name = "textBoxCell2"
Dim textBoxCell3 As TextBoxCell = New TextBoxCell()
textBoxCell3.Name = "textBoxCell3"
GcMultiRow1.Template = Template.CreateGridTemplate(New Cell() {textBoxCell1, textBoxCell2, textBoxCell3})
End Sub
Private Sub Button1_Click_1(sender As System.Object, e As System.EventArgs) Handles Button1.Click
If GcMultiRow1.Columns(1).IsCollapsed = True Then
GcMultiRow1.Columns(1).Expand()
Else
GcMultiRow1.Columns(1).Collapse()
End If
End Sub
[C#]
using GrapeCity.Win.MultiRow;
private void Form1_Load(object sender, EventArgs e)
{
TextBoxCell textBoxCell1 = new TextBoxCell();
textBoxCell1.Name = "textBoxCell1";
TextBoxCell textBoxCell2 = new TextBoxCell();
textBoxCell2.Name = "textBoxCell2";
TextBoxCell textBoxCell3 = new TextBoxCell();
textBoxCell3.Name = "textBoxCell3";
gcMultiRow1.Template = Template.CreateGridTemplate(new Cell[] { textBoxCell1, textBoxCell2, textBoxCell3 });
}
private void button1_Click(object sender, EventArgs e)
{
if (gcMultiRow1.Columns[1].IsCollapsed == true)
{
gcMultiRow1.Columns[1].Expand();
}
else
{
gcMultiRow1.Columns[1].Collapse();
}
}