NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGrid.PreferredRowHeight

Gets or sets the preferred row height for the DataGrid control.

[Visual Basic]
Public Property PreferredRowHeight As Integer
[C#]
public int PreferredRowHeight {get; set;}
[C++]
public: __property int get_PreferredRowHeight();
public: __property void set_PreferredRowHeight(int);
[JScript]
public function get PreferredRowHeight() : int;
public function set PreferredRowHeight(int);

Property Value

The height of a row.

Example [Visual Basic]

The following example first sets a new font, and sets the PreferredRowHeight to the same height as the new font.

[Visual Basic]

Private Sub ChangeFontHeight(ByVal gd As DataGrid)
   ' Change the font first.
   gd.Font = New System.Drawing.Font("Microsoft Sans Serif", 15!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World)
   gd.PreferredRowHeight = gd.Font.Height
End Sub

See Also

DataGrid Class | DataGrid Members | System.WinForms Namespace | GetPreferredHeight