FlexGrid for WinForms
Cell Content
Show AllShow All
Hide AllHide All

To control how the content of the cells is formatted, set the Format property to a format string similar to the ones you use with the String.Format method in the .NET framework. For example, the code below shows short dates on column one and currency values on column two:

To write code in Visual Basic

To write code in C#

The formatting of cell content can also be set at design time using the Format String dialog box.

The Format String dialog box can be accessed through the Column Tasks menu or through the C1FlexGrid Column Editor.

Note: The Format String dialog box is column specific and will only change the Format property of the selected column.

You can also use custom formats like the ones used in the Visual Basic Format function (for example, "#,###", and so on).

Retrieving Cell Data

You can retrieve the raw grid data using the indexers or the GetData method. To retrieve the formatted data, use the GetDataDisplay method instead. For example:

To write code in Visual Basic

To write code in C#

See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback