DataGrid.ParentRowsLabelStyleChanged 이벤트
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
부모 행의 레이블 스타일이 변경될 때 발생합니다.
public:
event EventHandler ^ ParentRowsLabelStyleChanged;
public event EventHandler ParentRowsLabelStyleChanged;
member this.ParentRowsLabelStyleChanged : EventHandler
Public Custom Event ParentRowsLabelStyleChanged As EventHandler
이벤트 유형
예제
다음 코드 예제에서는이 멤버를 사용 하는 방법을 보여 줍니다.
private:
void CallParentRowsLabelStyleChanged()
{
myDataGrid->ParentRowsLabelStyleChanged += gcnew EventHandler( this, &MyForm::DataGridParentRowsLabelStyleChanged_Clicked );
}
// Set the 'ParentRowsLabelStyle' property on click of a button.
void ToggleStyle_Clicked( Object^ /*sender*/, EventArgs^ /*e*/ )
{
if ( myDataGrid->ParentRowsLabelStyle.ToString()->Equals( "Both" ) )
myDataGrid->ParentRowsLabelStyle = DataGridParentRowsLabelStyle::TableName;
else
myDataGrid->ParentRowsLabelStyle = DataGridParentRowsLabelStyle::Both;
}
// raise the event when 'ParentRowsLabelStyle' property is changed.
void DataGridParentRowsLabelStyleChanged_Clicked( Object^ /*sender*/, EventArgs^ /*e*/ )
{
String^ myMessage = "ParentRowsLabelStyleChanged event raised, LabelStyle is : ";
// Get the state of 'ParentRowsLabelStyle' property.
String^ myLabelStyle = myDataGrid->ParentRowsLabelStyle.ToString();
myMessage = String::Concat( myMessage, myLabelStyle );
MessageBox::Show( myMessage, "ParentRowsLabelStyle information" );
}
private void CallParentRowsLabelStyleChanged()
{
myDataGrid.ParentRowsLabelStyleChanged +=
new EventHandler(DataGridParentRowsLabelStyleChanged_Clicked);
}
// Set the 'ParentRowsLabelStyle' property on click of a button.
private void ToggleStyle_Clicked(object sender, EventArgs e)
{
if (myDataGrid.ParentRowsLabelStyle.ToString() == "Both")
myDataGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.TableName;
else
myDataGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.Both;
}
// raise the event when 'ParentRowsLabelStyle' property is changed.
private void DataGridParentRowsLabelStyleChanged_Clicked(object sender, EventArgs e)
{
string myMessage = "ParentRowsLabelStyleChanged event raised, LabelStyle is : ";
// Get the state of 'ParentRowsLabelStyle' property.
string myLabelStyle = myDataGrid.ParentRowsLabelStyle.ToString();
myMessage += myLabelStyle;
MessageBox.Show(myMessage, "ParentRowsLabelStyle information");
}
Private Sub CallParentRowsLabelStyleChanged()
AddHandler myDataGrid.ParentRowsLabelStyleChanged, AddressOf _
DataGridParentRowsLabelStyleChanged_Clicked
End Sub
' Set the 'ParentRowsLabelStyle' property on click of a button.
Private Sub ToggleStyle_Clicked(ByVal sender As Object, ByVal e As EventArgs)
If myDataGrid.ParentRowsLabelStyle.ToString() = "Both" Then
myDataGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.TableName
Else
myDataGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.Both
End If
End Sub
' raise the event when 'ParentRowsLabelStyle' property is changed.
Private Sub DataGridParentRowsLabelStyleChanged_Clicked(ByVal sender As Object, ByVal e As EventArgs)
Dim myMessage As String = "ParentRowsLabelStyleChanged event raised, LabelStyle is : "
' Get the state of 'ParentRowsLabelStyle' property.
Dim myLabelStyle As String = myDataGrid.ParentRowsLabelStyle.ToString()
myMessage += myLabelStyle
MessageBox.Show(myMessage, "ParentRowsLabelStyle information")
End Sub