DataGrid.ParentRowsVisibleChanged Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when the ParentRowsVisible property value changes.
public:
event EventHandler ^ ParentRowsVisibleChanged;
public event EventHandler ParentRowsVisibleChanged;
member this.ParentRowsVisibleChanged : EventHandler
Public Custom Event ParentRowsVisibleChanged As EventHandler
Event Type
Examples
The following code example demonstrates the use of this member.
private:
void CallParentRowsVisibleChanged()
{
myDataGrid->ParentRowsVisibleChanged += gcnew EventHandler( this, &MyForm::DataGridParentRowsVisibleChanged_Clicked );
}
// Set the 'ParentRowsVisible' property on click of a button.
void ToggleVisible_Clicked( Object^ /*sender*/, EventArgs^ /*e*/ )
{
if (myDataGrid->ParentRowsVisible)
myDataGrid->ParentRowsVisible = false;
else
myDataGrid->ParentRowsVisible = true;
}
// raise the event when 'ParentRowsVisible' property is changed.
void DataGridParentRowsVisibleChanged_Clicked( Object^ /*sender*/, EventArgs^ /*e*/ )
{
String^ myMessage = "ParentRowsVisibleChanged event raised, Parent row is : ";
bool visible = myDataGrid->ParentRowsVisible;
myMessage = String::Concat( myMessage, visible ? (String^)" " : " NOT ", "visible" );
MessageBox::Show( myMessage, "ParentRowsVisible information" );
}
private void CallParentRowsVisibleChanged()
{
myDataGrid.ParentRowsVisibleChanged +=
new EventHandler(DataGridParentRowsVisibleChanged_Clicked);
}
// Set the 'ParentRowsVisible' property on click of a button.
private void ToggleVisible_Clicked(object sender, EventArgs e)
{
if (myDataGrid.ParentRowsVisible)
myDataGrid.ParentRowsVisible = false;
else
myDataGrid.ParentRowsVisible = true;
}
// raise the event when 'ParentRowsVisible' property is changed.
private void DataGridParentRowsVisibleChanged_Clicked(object sender, EventArgs e)
{
string myMessage = "ParentRowsVisibleChanged event raised, Parent row is : ";
bool visible = myDataGrid.ParentRowsVisible;
myMessage += (visible ? " " : " NOT ") + "visible";
MessageBox.Show(myMessage, "ParentRowsVisible information");
}
Private Sub CallParentRowsVisibleChanged()
AddHandler myDataGrid.ParentRowsVisibleChanged, AddressOf _
DataGridParentRowsVisibleChanged_Clicked
End Sub
' Set the 'ParentRowsVisible' property on click of a button.
Private Sub ToggleVisible_Clicked(ByVal sender As Object, ByVal e As EventArgs)
If myDataGrid.ParentRowsVisible = True Then
myDataGrid.ParentRowsVisible = False
Else
myDataGrid.ParentRowsVisible = True
End If
End Sub
' raise the event when 'ParentRowsVisible' property is changed.
Private Sub DataGridParentRowsVisibleChanged_Clicked(ByVal sender As Object, ByVal e As EventArgs)
Dim myMessage As String = "ParentRowsVisibleChanged event raised, Parent row is : "
Dim visible As Boolean = myDataGrid.ParentRowsVisible
myMessage += IIF(visible, " ", "Not") + "Visible"
MessageBox.Show(myMessage, "ParentRowsVisible information")
End Sub
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET