バージョン

EditingControlPropertyName プロパティ (UltraControlContainerEditor)

所有オブジェクトの値を決定するための EditingControl のプロパティの名前を取得または設定します。
シンタックス
'宣言
 
Public Property EditingControlPropertyName As String
public string EditingControlPropertyName {get; set;}
解説

エディターを使用できるのに、このプロパティに指定された EditingControl の単一のプロパティを処理する必要があります。EditingControlPropertyName を指定しない場合は、コントロールに名前が Value であるプロパティを検索します。ない場合は、Text プロパティを使用します。Value および Text プロパティがない場合は、エディターは正しく機能できません。

ControlContainerEditor は、コントロールの指定したプロパティが変更されたことを認識する必要があります。そのために、プロパティと一致する名前によってイベントを指定したコントロールにフックを使用とします。このイベントは存在しないまたはプロパティが変更されても発生しない場合は、エディターはオーナーに変更を書き込みすることができません。この場合は、開発者は ControlContainerEditor からクラスを派生し、EditorValue プロパティをオーバーライドし、エディター値が変更されたときにこのプロパティを設定することを推奨します。

使用例
Imports Infragistics.Win.UltraWinEditors



' Create a TrackBar for editing. This control will be used for cells that
' are in edit mode. 
'
Dim trackBarForEditing As TrackBar = New TrackBar()
trackBarForEditing.Minimum = 0
trackBarForEditing.Maximum = 10
Me.Controls.Add(trackBarForEditing)

' Set the EditingControl on the UltraControlContainer to the trackBarForEditing. 
'
Me.ultraControlContainerEditor1.EditingControl = trackBarForEditing

' Create another TrackBar for rendering. This will be used for cells that 
' are NOT in edit mode. Since both trackbars will serve the same grid column
' it makes sense to set all of the properties the same. 
'
Dim trackBarForRendering As TrackBar = New TrackBar()
trackBarForRendering.Minimum = 0
trackBarForRendering.Maximum = 10
Me.Controls.Add(trackBarForRendering)

' Set the RenderingControl on the UltraControlContainer to the trackBarForRendering. 
'
Me.ultraControlContainerEditor1.RenderingControl = trackBarForRendering

' Set ApplyOwnerAppearanceToEditingControl so that the Trackbar will not pick
' up the appearance of the cell. 
'
Me.ultraControlContainerEditor1.ApplyOwnerAppearanceToEditingControl = False
Me.ultraControlContainerEditor1.ApplyOwnerAppearanceToRenderingControl = False

' Tell the UltraControlContainerEditor to use the Value property on the 
' trackbar for both the editing and rendering value. 
'
Me.ultraControlContainerEditor1.EditingControlPropertyName = "Value"
Me.ultraControlContainerEditor1.RenderingControlPropertyName = "Value"

' Since the editing and rendering controls are exactly the same, we want
' the user to be able to click and drag the trackbar thumb with a single 
' click and drag. Setting EnterEditModeMouseBehavior to 
' EnterEditModeAndClick will allow the editor to forward the MouseDown 
' that causes the cell to enter edit mode to the Trackbar control.
'
Me.ultraControlContainerEditor1.EnterEditModeMouseBehavior = EnterEditModeMouseBehavior.EnterEditModeAndClick

' Assign the UltraControlContainerEditor to the grid column
'
Me.ultraGrid1.DisplayLayout.Bands(0).Columns(0).EditorComponent = Me.ultraControlContainerEditor1
using Infragistics.Win.UltraWinEditors;


// Create a TrackBar for editing. This control will be used for cells that
// are in edit mode. 
//
TrackBar trackBarForEditing = new TrackBar();
trackBarForEditing.Minimum = 0;
trackBarForEditing.Maximum = 10;
this.Controls.Add(trackBarForEditing);

// Set the EditingControl on the UltraControlContainer to the trackBarForEditing. 
//
this.ultraControlContainerEditor1.EditingControl = trackBarForEditing;

// Create another TrackBar for rendering. This will be used for cells that 
// are NOT in edit mode. Since both trackbars will serve the same grid column
// it makes sense to set all of the properties the same. 
//
TrackBar trackBarForRendering = new TrackBar();
trackBarForRendering.Minimum = 0;
trackBarForRendering.Maximum = 10;
this.Controls.Add(trackBarForRendering);

// Set the RenderingControl on the UltraControlContainer to the trackBarForRendering. 
//
this.ultraControlContainerEditor1.RenderingControl = trackBarForRendering;

// Set ApplyOwnerAppearanceToEditingControl so that the Trackbar will not pick
// up the appearance of the cell. 
//
this.ultraControlContainerEditor1.ApplyOwnerAppearanceToEditingControl = false;
this.ultraControlContainerEditor1.ApplyOwnerAppearanceToRenderingControl = false;

// Tell the UltraControlContainerEditor to use the Value property on the 
// trackbar for both the editing and rendering value. 
//
this.ultraControlContainerEditor1.EditingControlPropertyName = "Value";
this.ultraControlContainerEditor1.RenderingControlPropertyName = "Value";

// Since the editing and rendering controls are exactly the same, we want
// the user to be able to click and drag the trackbar thumb with a single 
// click and drag. Setting EnterEditModeMouseBehavior to 
// EnterEditModeAndClick will allow the editor to forward the MouseDown 
// that causes the cell to enter edit mode to the Trackbar control.
//
this.ultraControlContainerEditor1.EnterEditModeMouseBehavior = EnterEditModeMouseBehavior.EnterEditModeAndClick;

// Assign the UltraControlContainerEditor to the grid column
//
this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].EditorComponent = this.ultraControlContainerEditor1;
参照