GrapeCity SPREAD for WPF 2.0J
EditElementTemplate プロパティ

セルの編集に使用されるデータテンプレートを取得または設定します。
構文
'Declaration
 
Public Property EditElementTemplate As DataTemplate
public DataTemplate EditElementTemplate {get; set;}

プロパティ値

データテンプレート。既定値は null 参照 (Visual Basicでは Nothing) です。
次のサンプルは DataTemplateCellTypeの使用方法を説明します。このサンプルでは、表示用にテキストブロックを設定し、編集用にチェックボックスを設定します。
<DataTemplate x:Key ="Display">
    <Grid Background="Red">
        <TextBlock Text="{Binding Value}"></TextBlock>
    </Grid>
</DataTemplate>
<DataTemplate x:Key ="Edit">
    <CheckBox IsChecked="{Binding Value, Mode= TwoWay}"></CheckBox>
</DataTemplate>
DataTemplateCellType dataTemplateCellType = new DataTemplateCellType();
dataTemplateCellType.DisplayElementTemplate = this.Resources["Display"] as DataTemplate;
dataTemplateCellType.EditElementTemplate = this.Resources["Edit"] as DataTemplate;
gcSpreadGrid1[0, 0].CellType = dataTemplateCellType;
Dim dataTemplateCellType As New DataTemplateCellType()
dataTemplateCellType.DisplayElementTemplate = TryCast(Me.Resources("Display"), DataTemplate)
dataTemplateCellType.EditElementTemplate = TryCast(Me.Resources("Edit"), DataTemplate)
gcSpreadGrid1(0, 0).CellType = dataTemplateCellType
参照

DataTemplateCellType クラス
DataTemplateCellType メンバ

 

 


Copyright © 2012 GrapeCity inc. All rights reserved.