GridColumnStylesCollection.Clear メソッド
アセンブリ: 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

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からGridColumnStylesCollection.Clear メソッドを検索する場合は、下記のリンクをクリックしてください。

- GridColumnStylesCollection.Clear メソッドのページへのリンク