FlexGrid for WinForms
BuildString(StyleElementFlags) Method
Example 



StyleElementFlags that specifies which style elements should be included in the string.
Returns a string representation of this CellStyle.
Syntax
'Declaration
 
Public Overloads Function BuildString( _
   ByVal elements As StyleElementFlags _
) As String
'Usage
 
Dim instance As CellStyle
Dim elements As StyleElementFlags
Dim value As String
 
value = instance.BuildString(elements)
public string BuildString( 
   StyleElementFlags elements
)
public:
String^ BuildString( 
   StyleElementFlags elements
) 

Parameters

elements
StyleElementFlags that specifies which style elements should be included in the string.

Return Value

A string containing the settings of the specified style elements.
Remarks

This method is used to persist grid styles and can be used to define and save 'skins'.

See the CellStyleCollection.BuildString and CellStyleCollection.ParseString methods.

Example
The code below shows the effect of specifying different values for the elements parameter. It builds one compact string containing only the elements actually defined in a style, and another including all style elements.
// build compact and a long style definition strings
string s1 = _flex.Styles.Fixed.BuildString();
string s2 = _flex.Styles.Fixed.BuildString(StyleElementFlags.All);
            
// show both style definitions
Console.WriteLine("{0}: {1}", s1.Length, s1);
Console.WriteLine("{0}: {1}", s2.Length, s2);
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

CellStyle Class
CellStyle Members
Overload List

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback