PowerTools CalendarGrid for Windows Forms 1.0J
DataMember プロパティ (CalendarGcComboBoxCellType)
使用例 

バインドしているメンバーの文字列を表す値を取得または設定します。
構文
Public Property DataMember As String
public string DataMember {get; set;}

プロパティ値

バインドしているメンバーを示す System.String 値。
既定値は System.String.Empty です。
使用例
次のサンプルコードは、データバインディングの使用方法を示します。このサンプルコードは、DataSource プロパティに示されている詳細なコード例の一部を抜粋したものです。
private void Form1_Load(object sender, EventArgs e)
{
    CalendarGcComboBoxCellType gcComboBoxCell1 = new CalendarGcComboBoxCellType();
    gcComboBoxCell1.DropDown.Size = new Size(120, 80);
    //Set the DataSource.
    gcComboBoxCell1.DataSource = CreateDateTable1();

    CalendarTemplate template1 = CalendarTemplate.CreateDefaultTemplate();
    template1.Content[1, 0].CellType = gcComboBoxCell1;
    template1.Content[2, 0].CellType = gcComboBoxCell1.Clone();

    gcCalendarGrid1.Template = template1;
}
Private Sub Form1_Load(sender As Object, e As EventArgs)
    Dim gcComboBoxCell1 As New CalendarGcComboBoxCellType()
    gcComboBoxCell1.DropDown.Size = New Size(120, 80)
    'Set the DataSource.
    gcComboBoxCell1.DataSource = CreateDateTable1()

    Dim template1 As CalendarTemplate = CalendarTemplate.CreateDefaultTemplate()
    template1.Content(1, 0).CellType = gcComboBoxCell1
    template1.Content(2, 0).CellType = gcComboBoxCell1.Clone()

    gcCalendarGrid1.Template = template1
End Sub
参照

CalendarGcComboBoxCellType クラス
CalendarGcComboBoxCellType メンバ
DataSource プロパティ

 

 


© 2014 GrapeCity inc. All rights reserved.