DataGridTableStyle::ResetHeaderFont Method ()

 

Resets the HeaderFont property to its default value.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
void ResetHeaderFont()

You typically use this method if you are either creating a designer for the DataGridTableStyle or creating your own control incorporating the DataGridTableStyle.

The following code example demonstrates the use of this member.

private:
   void MySetButton_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      // Set the 'HeaderFont' property of the DataGridTableStyle instance.
      myTableStyle->HeaderFont = gcnew System::Drawing::Font( "Impact",10 );

      // Add the DataGridTableStyle instance to the GridTableStylesCollection.
      myDataGrid->TableStyles->Add( myTableStyle );
   }

   void MyResetButton_Click( Object^ /*sender*/, EventArgs^ /*e*/ )
   {
      // Reset the Header Font to its default value.
      myTableStyle->ResetHeaderFont();
   }

.NET Framework
Available since 1.1
Return to top
Show: