다음을 통해 공유


DataGridTableStyle.PreferredRowHeightChanged 이벤트

정의

PreferredRowHeight 값이 변경될 때 발생합니다.

public:
 event EventHandler ^ PreferredRowHeightChanged;
public event EventHandler PreferredRowHeightChanged;
member this.PreferredRowHeightChanged : EventHandler 
Public Custom Event PreferredRowHeightChanged As EventHandler 

이벤트 유형

EventHandler

예제

다음 코드 예제에서는이 멤버를 사용 하는 방법을 보여 줍니다.

void SetUp()
{
   // Create a DataSet with a table.
   MakeDataSet();

   // Bind the DataGrid to the DataSet.
   myDataGrid->SetDataBinding( myDataSet, "Orders" );
   myTableStyle = gcnew DataGridTableStyle;

   // Map 'DataGridTableStyle' instance to the DataTable.
   myTableStyle->MappingName = "Orders";

   // Add EventHandler function for 'PreferredRowHeightChanged' Event.
   myTableStyle->PreferredRowHeightChanged += gcnew EventHandler( this, &MyDataForm::RowHeight_Changed );
}

// Called when the PreferredRowHeight property of myTableStyle is modified
void RowHeight_Changed( Object^ /*sender*/, EventArgs^ /*e*/ )
{
   MessageBox::Show( "PreferredRowHeight property is changed" );
}
private void SetUp()
{
   // Create a DataSet with a table.
   MakeDataSet();
   // Bind the DataGrid to the DataSet.
   myDataGrid.SetDataBinding(myDataSet, "Orders");
   myTableStyle = new DataGridTableStyle();
   // Map 'DataGridTableStyle' instance to the DataTable.
   myTableStyle.MappingName = "Orders";
   // Add EventHandler function for 'PreferredRowHeightChanged' Event.
   myTableStyle.PreferredRowHeightChanged+=new EventHandler(RowHeight_Changed);
}
// Called when the PreferredRowHeight property of myTableStyle is modified
private void RowHeight_Changed(object sender, EventArgs e)
{
   MessageBox.Show("PreferredRowHeight property is changed");
}
Private Sub SetUp()
   ' Create a DataSet with a table.
   MakeDataSet()
   ' Bind the DataGrid to the DataSet.
   myDataGrid.SetDataBinding(myDataSet, "Orders")
   myTableStyle = New DataGridTableStyle()
   ' Map 'DataGridTableStyle' instance to the DataTable.
   myTableStyle.MappingName = "Orders"
   ' Add EventHandler function for 'PreferredRowHeightChanged' Event.
   AddHandler myTableStyle.PreferredRowHeightChanged, AddressOf RowHeight_Changed
End Sub

' Called when the PreferredRowHeight property of myTableStyle is modified
 Private Sub RowHeight_Changed(ByVal sender As Object, ByVal e As EventArgs)
     MessageBox.Show("PreferredRowHeight property is changed")
 End Sub

설명

이벤트 처리에 대한 자세한 내용은 이벤트 처리 및 발생 을 참조하십시오.

적용 대상

추가 정보