Xceed Grid for WinForms v4.3 Documentation
GetFittedWidth(AutoWidthMode,Graphics,Boolean) Method


Xceed.Grid.v4.3 Assembly > Xceed.Grid Namespace > Column Class > GetFittedWidth Method : GetFittedWidth(AutoWidthMode,Graphics,Boolean) Method
This parameter is reserved for future use.
The System.Drawing.Graphics object used to paint the column.
true if the column is being printed; false otherwise.
Retrieves the fitted width of the column in pixels.
Syntax
'Declaration
 
Protected Overloads Function GetFittedWidth( _
   ByVal mode As AutoWidthMode, _
   ByVal graphics As Graphics, _
   ByVal printing As Boolean _
) As Integer
'Usage
 
Dim instance As Column
Dim mode As AutoWidthMode
Dim graphics As Graphics
Dim printing As Boolean
Dim value As Integer
 
value = instance.GetFittedWidth(mode, graphics, printing)
protected int GetFittedWidth( 
   AutoWidthMode mode,
   Graphics graphics,
   bool printing
)

Parameters

mode
This parameter is reserved for future use.
graphics
The System.Drawing.Graphics object used to paint the column.
printing
true if the column is being printed; false otherwise.

Return Value

A value containing the fitted width of the column, including its Borders, in pixels.
Remarks

The fitted width of the column represents the width necessary to display the column's cells' data on one line, regardless of the value of the WordWrap property.

The GetFittedWidth method must be called outside of the calls to GridControl.BeginInit and GridControl.EndInit methods because the data is not loaded into the grid until EndInit is called therefore, the fitted width cannot be calculated until that moment.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Column Class
Column Members
Overload List