DataGridColumnStyle::GetMinimumHeight Method ()

 

When overridden in a derived class, gets the minimum height of a row.

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

public protected:
virtual int GetMinimumHeight() abstract

Return Value

Type: System::Int32

The minimum height of a row.

The following code example gets the minimum height of the column.

public ref class MyGridColumn: public DataGridBoolColumn
{
public:
   int GetMinHeight()
   {
      return this->GetMinimumHeight();
   }

};

public ref class Form1: public Form
{
protected:
   DataGrid^ dataGrid1;

private:
   void GetHeight()
   {
      MyGridColumn^ myGridColumn = dynamic_cast<MyGridColumn^>(dataGrid1->TableStyles[ 1 ]->GridColumnStyles[ 0 ]);
      Console::WriteLine( myGridColumn->GetMinHeight() );
   }

};

.NET Framework
Available since 1.1
Return to top
Show: