Xceed Grid for WinForms v4.3 Documentation
GetFittedWidth Method (Cell)


Xceed.Grid.v4.3 Assembly > Xceed.Grid Namespace > Cell Class : GetFittedWidth Method
Retrieves the fitted width of the cell in pixels.
Syntax
'Declaration
 
Public Function GetFittedWidth() As Integer
'Usage
 
Dim instance As Cell
Dim value As Integer
 
value = instance.GetFittedWidth()
public int GetFittedWidth()

Return Value

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

The fitted width of the cell represents the width necessary to display the cell's 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

Cell Class
Cell Members