GridColumnStylesCollection.Clear メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > GridColumnStylesCollection.Clear メソッドの意味・解説 

GridColumnStylesCollection.Clear メソッド

DataGridColumnStyle オブジェクトコレクション削除します

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

使用例使用例
Private Sub Clear_Clicked(ByVal
 sender As Object, ByVal
 e As System.EventArgs) Handles clearButton.Click
    ' TablesAlreadyAdded set to false so that table styles can be added
 again.
    TablesAlreadyAdded = False
    myLabel.Text = "All Table Styles Cleared."
    ' Clear all the column styles and also table style for the grid.
    Dim myTableStyle As DataGridTableStyle
    For Each myTableStyle In
 myDataGrid.TableStyles
        Dim myColumns As GridColumnStylesCollection
 = myTableStyle.GridColumnStyles
        myColumns.Clear()
    Next myTableStyle
    myDataGrid.TableStyles.Clear()
End Sub 'Clear_Clicked

private void Clear_Clicked(object sender, System.EventArgs
 e)
{
   // TablesAlreadyAdded set to false so that table styles can be added
 again.
   TablesAlreadyAdded = false;
   myLabel.Text = "All Table Styles Cleared.";
   // Clear all the column styles and also table style for the grid.
   foreach (DataGridTableStyle myTableStyle in
 myDataGrid.TableStyles)
   {
      GridColumnStylesCollection myColumns = myTableStyle.GridColumnStyles;
      myColumns.Clear();
   }
   myDataGrid.TableStyles.Clear();
}
private:
   void Clear_Clicked( Object^ /*sender*/, System::EventArgs^
 /*e*/ )
   {
      // TablesAlreadyAdded set to false so that table styles can be added
 again.
      TablesAlreadyAdded = false;
      myLabel->Text = "All Table Styles Cleared.";

      // Clear all the column styles and also table style for the grid.
      IEnumerator^ myEnum = myDataGrid->TableStyles->GetEnumerator();
      while ( myEnum->MoveNext() )
      {
         DataGridTableStyle^ myTableStyle = safe_cast<DataGridTableStyle^>(myEnum->Current);
         GridColumnStylesCollection^ myColumns = myTableStyle->GridColumnStyles;
         myColumns->Clear();
      }

      myDataGrid->TableStyles->Clear();
   }
private void ClearClicked(Object sender, System.EventArgs
 e)
{
    // TablesAlreadyAdded set to false so that table styles can be
    // added again.
    TablesAlreadyAdded = false;
    myLabel.set_Text("All Table Styles Cleared.");

    // Clear all the column styles and also table style for the grid.
    for (int iCtr = 0; iCtr < myDataGrid.get_TableStyles().get_Count();
        iCtr++) {
        DataGridTableStyle myTableStyle = myDataGrid.get_TableStyles().
            get_Item(iCtr);
        GridColumnStylesCollection myColumns = myTableStyle.
            get_GridColumnStyles();
        myColumns.Clear();
    }
    myDataGrid.get_TableStyles().Clear();
} //ClearClicked
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GridColumnStylesCollection クラス
GridColumnStylesCollection メンバ
System.Windows.Forms 名前空間
Add


このページでは「.NET Framework クラス ライブラリ リファレンス」からGridColumnStylesCollection.Clear メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からGridColumnStylesCollection.Clear メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からGridColumnStylesCollection.Clear メソッド を検索

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

辞書ショートカット

すべての辞書の索引

GridColumnStylesCollection.Clear メソッドのお隣キーワード
検索ランキング

   

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



GridColumnStylesCollection.Clear メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS