Type | Description | |||
String | A string expression that defines the format to display the cell, including HTML formatting, if the cell supports it. |
The CellValue property of the cell is being shown as:
In other words, all cells applies the format of the FormatColumn property, excepts the cells with the FormatCell property being set. If the cell belongs to a column with the FireFormatColumn property on True, the Value parameter of the FormatColumn event shows the newly caption for the cell to be shown.
For instance:
The value keyword in the FormatColumn property indicates the value to be formatted.
The expression supports cell's identifiers as follows:
The expression predefined operators for auto-numbering are:
In the following screen shot the FormatColumn("Col 1") = "1 index ''"
In the following screen shot the FormatColumn("Col 1") = "1 index 'A-Z'"
In the following screen shot the FormatColumn("Col 1") = "1 apos ''"
In the following screen shot the FormatColumn("Col 1") = "1 apos 'A-Z'"
In the following screen shot the FormatColumn("Col 2") = "'<b>' + 1 pos '' + '</b> ' + value"
In the following screen shot the FormatColumn("Col 2") = "'<b>' + 1 pos 'A-Z' + '</b> ' + value"
In the following screen shot the FormatColumn("Col 1") = "1 rpos ''"
In the following screen shot the FormatColumn("Col 1") = "1 rpos ':|A-Z'"
In the following screen shot the FormatColumn("Col 1") = "1 rpos '.|A-Z|'"
In the following screen shot the FormatColumn("Col 1") = "1 apos ''" and FormatColumn("Col 2") = "'<b><font Tahoma;10>' + 1 rpos '.|A-Z|' + '</font></b> ' + value"
number rindex 'format', number rapos 'format' and number ropos 'format' are working similar with number rpos 'format', excepts that they gives the index, absolute position, or the old child position.
This property/method supports predefined constants and operators/functions as described here.
The following VB sample shows how can I display the column using currency:With G2antt1 .Columns.Add("Currency").FormatColumn = "currency(dbl(value))" With .Items .AddItem "1.23" .AddItem "2.34" .AddItem "0" .AddItem 5 .AddItem "10000.99" End With End WithThe following VB.NET sample shows how can I display the column using currency:
With AxG2antt1 .Columns.Add("Currency").FormatColumn = "currency(dbl(value))" With .Items .AddItem "1.23" .AddItem "2.34" .AddItem "0" .AddItem 5 .AddItem "10000.99" End With End WithThe following C++ sample shows how can I display the column using currency:
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import "C:\\Windows\\System32\\ExG2antt.dll" using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Currency")))->PutFormatColumn(L"currency(dbl(value))"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->AddItem("1.23"); var_Items->AddItem("2.34"); var_Items->AddItem("0"); var_Items->AddItem(long(5)); var_Items->AddItem("10000.99");The following C# sample shows how can I display the column using currency:
(axG2antt1.Columns.Add("Currency") as EXG2ANTTLib.Column).FormatColumn = "currency(dbl(value))"; EXG2ANTTLib.Items var_Items = axG2antt1.Items; var_Items.AddItem("1.23"); var_Items.AddItem("2.34"); var_Items.AddItem("0"); var_Items.AddItem(5); var_Items.AddItem("10000.99");The following VFP sample shows how can I display the column using currency:
with thisform.G2antt1 .Columns.Add("Currency").FormatColumn = "currency(dbl(value))" with .Items .AddItem("1.23") .AddItem("2.34") .AddItem("0") .AddItem(5) .AddItem("10000.99") endwith endwith