DataGrid.ParentRowsLabelStyleChanged イベントとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGrid.ParentRowsLabelStyleChanged イベントの意味・解説 

DataGrid.ParentRowsLabelStyleChanged イベント

親行のラベル スタイル変更される発生します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Event ParentRowsLabelStyleChanged As
 EventHandler
Dim instance As DataGrid
Dim handler As EventHandler

AddHandler instance.ParentRowsLabelStyleChanged, handler
public event EventHandler ParentRowsLabelStyleChanged
public:
event EventHandler^ ParentRowsLabelStyleChanged {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
/** @event */
public void add_ParentRowsLabelStyleChanged
 (EventHandler value)

/** @event */
public void remove_ParentRowsLabelStyleChanged
 (EventHandler value)
JScript では、イベント使用できますが、新規に宣言することはできません。
解説解説
使用例使用例
Private Sub CallParentRowsLabelStyleChanged()
   AddHandler myDataGrid.ParentRowsLabelStyleChanged, AddressOf
 _
                                        DataGridParentRowsLabelStyleChanged_Clicked
End Sub 'CallParentRowsLabelStyleChanged


' 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 'ToggleStyle_Clicked

 ' 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 'DataGridParentRowsLabelStyleChanged_Clicked

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:
   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.add_ParentRowsLabelStyleChanged(
        new EventHandler(DataGridParentRowsLabelStyleChanged_Clicked));
} //CallParentRowsLabelStyleChanged

// Set the 'ParentRowsLabelStyle' property on click of a button.
protected void ToggleStyle_Clicked(Object sender,
 EventArgs e)
{
    if (myDataGrid.get_ParentRowsLabelStyle().ToString().Equals("Both"))
 {
        myDataGrid.set_ParentRowsLabelStyle( 
            DataGridParentRowsLabelStyle.TableName);
    }
    else {
        myDataGrid.set_ParentRowsLabelStyle( 
            DataGridParentRowsLabelStyle.Both);
    }
} //ToggleStyle_Clicked

// raise the event when 'ParentRowsLabelStyle' property is changed.
protected void DataGridParentRowsLabelStyleChanged_Clicked(Object
 sender,
    EventArgs e)
{
    String myMessage = "ParentRowsLabelStyleChanged event raised, " 
        + "LabelStyle is : ";

    // Get the state of 'ParentRowsLabelStyle' property.
    String myLabelStyle = myDataGrid.get_ParentRowsLabelStyle().ToString();

    myMessage += myLabelStyle;
    MessageBox.Show(myMessage, "ParentRowsLabelStyle information");
} //DataGridParentRowsLabelStyleChanged_Clicked
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

DataGrid.ParentRowsLabelStyleChanged イベントのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataGrid.ParentRowsLabelStyleChanged イベントのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS