DataGridTableStyle.ResetBackColor メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)



Private Sub AddCustomColumnStyle() ' Set the TableStyle Mapping name. myTableStyle.MappingName = "customerTable" myTableStyle.BackColor = Color.Pink ' Set the ColumnStyle properties and add to TableStyle. myColumnStyle.MappingName = "Customers" myColumnStyle.HeaderText = "Customer Name" myColumnStyle.Width = 250 myTableStyle.GridColumnStyles.Add(myColumnStyle) myDataGrid.TableStyles.Add(myTableStyle) End Sub 'AddCustomColumnStyle Private Sub myButton1_Click(sender As Object, e As EventArgs) ' Reset the background color. myTableStyle.ResetBackColor() End Sub 'myButton1_Click
private void AddCustomColumnStyle() { // Set the TableStyle Mapping name. myTableStyle.MappingName = "customerTable"; myTableStyle.BackColor = Color.Pink; // Set the ColumnStyle properties and add to TableStyle. myColumnStyle.MappingName = "Customers"; myColumnStyle.HeaderText = "Customer Name"; myColumnStyle.Width = 250; myTableStyle.GridColumnStyles.Add(myColumnStyle); myDataGrid.TableStyles.Add(myTableStyle); } private void myButton1_Click(object sender, EventArgs e) { // Reset the background color. myTableStyle.ResetBackColor(); }
private: void AddCustomColumnStyle() { // Set the TableStyle Mapping name. myTableStyle->MappingName = "customerTable"; myTableStyle->BackColor = Color::Pink; // Set the ColumnStyle properties and add to TableStyle. myColumnStyle->MappingName = "Customers"; myColumnStyle->HeaderText = "Customer Name"; myColumnStyle->Width = 250; myTableStyle->GridColumnStyles->Add( myColumnStyle ); myDataGrid->TableStyles->Add( myTableStyle ); } void myButton1_Click( Object^ /*sender*/, EventArgs^ /*e*/ ) { // Reset the background color. myTableStyle->ResetBackColor(); }
private void AddCustomColumnStyle() { // Set the TableStyle Mapping name. myTableStyle.set_MappingName("customerTable"); myTableStyle.set_BackColor(Color.get_Pink()); // Set the ColumnStyle properties and add to TableStyle. myColumnStyle.set_MappingName("Customers"); myColumnStyle.set_HeaderText("Customer Name"); myColumnStyle.set_Width(250); myTableStyle.get_GridColumnStyles().Add(myColumnStyle); myDataGrid.get_TableStyles().Add(myTableStyle); } //AddCustomColumnStyle private void myButton1_Click(Object sender, EventArgs e) { // Reset the background color. myTableStyle.ResetBackColor(); } //myButton1_Click

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- DataGridTableStyle.ResetBackColor メソッドのページへのリンク