DataGridColumnStyle.CheckValidDataSource(CurrencyManager) DataGridColumnStyle.CheckValidDataSource(CurrencyManager) DataGridColumnStyle.CheckValidDataSource(CurrencyManager) DataGridColumnStyle.CheckValidDataSource(CurrencyManager) Method

정의

DataGrid의 데이터 소스가 올바르지 않거나 이 열이 데이터 소스의 올바른 속성에 매핑되지 않으면 예외가 throw됩니다.Throws an exception if the DataGrid does not have a valid data source, or if this column is not mapped to a valid property in the data source.

protected:
 void CheckValidDataSource(System::Windows::Forms::CurrencyManager ^ value);
protected void CheckValidDataSource (System.Windows.Forms.CurrencyManager value);
member this.CheckValidDataSource : System.Windows.Forms.CurrencyManager -> unit
Protected Sub CheckValidDataSource (value As CurrencyManager)

매개 변수

예외

예제

다음 코드 예제에서는 CurrencyManager 사용 하 여 데이터 원본에 대 한 합니다 CheckValidDataSource 여부를 확인 하는 CurrencyManager 유효 합니다.The following code example gets a CurrencyManager for a data source and uses the CheckValidDataSource to determine if the CurrencyManager is valid.

private:
   void CheckCurrencyManager( CurrencyManager^ myCurrencyManager )
   {
      // This code is from a class named MyDataGridColumnStyle derived
      // from DataGridColumnStyle.
      MyDataGridColumnStyle^ myGridColumn = this;
      try
      {
         myGridColumn->CheckValidDataSource( myCurrencyManager );
      }
      catch ( ArgumentNullException^ e ) 
      {
         Console::WriteLine( e->Message );
      }
      catch ( ApplicationException^ e ) 
      {
         Console::WriteLine( e->Message );
      }
   }
private void CheckCurrencyManager(CurrencyManager myCurrencyManager) {
    // This code is from a class named MyDataGridColumnStyle derived
    // from DataGridColumnStyle.
    MyDataGridColumnStyle myGridColumn = this;
    try {
        myGridColumn.CheckValidDataSource(myCurrencyManager);
    }
    catch (ArgumentNullException e) {
        Console.WriteLine(e.Message);
    }
    catch (ApplicationException e) {
        Console.WriteLine(e.Message);
    }
}
Private Sub CheckCurrencyManager(myCurrencyManager As CurrencyManager)
    ' This code is from a class named MyDataGridColumnStyle derived
    ' from DataGridColumnStyle.
    Dim myGridColumn As MyDataGridColumnStyle = Me
    Try
        myGridColumn.CheckValidDataSource(myCurrencyManager)
    Catch e As ArgumentNullException
        Console.WriteLine(e.Message)
    Catch e As ApplicationException
        Console.WriteLine(e.Message)
    End Try
End Sub

적용 대상