Type | Description | |||
String | A string expression that defines the format to display the cell, including HTML formatting, if the cell supports it. |
For instance:
The value keyword in the FormatColumn/FormatCell property indicates the value to be formatted.
The expression supports cell's identifiers as follows:
Other known 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 List1 .Columns.Add("Currency").FormatColumn = "currency(dbl(value))" With .Items .Add "1.23" .Add "2.34" .Add "0" .Add 5 .Add "10000.99" End With End WithThe following VB.NET sample shows how can I display the column using currency:
With AxList1 .Columns.Add("Currency").FormatColumn = "currency(dbl(value))" With .Items .Add "1.23" .Add "2.34" .Add "0" .Add 5 .Add "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 'EXLISTLib' for the library: 'ExList 1.0 Control Library' #import "C:\\Windows\\System32\\ExList.dll" using namespace EXLISTLib; */ EXLISTLib::IListPtr spList1 = GetDlgItem(IDC_LIST1)->GetControlUnknown(); ((EXLISTLib::IColumnPtr)(spList1->GetColumns()->Add(L"Currency")))->PutFormatColumn(L"currency(dbl(value))"); EXLISTLib::IItemsPtr var_Items = spList1->GetItems(); var_Items->Add("1.23"); var_Items->Add("2.34"); var_Items->Add("0"); var_Items->Add(long(5)); var_Items->Add("10000.99");The following C# sample shows how can I display the column using currency:
(axList1.Columns.Add("Currency") as EXLISTLib.Column).FormatColumn = "currency(dbl(value))"; EXLISTLib.Items var_Items = axList1.Items; var_Items.Add("1.23"); var_Items.Add("2.34"); var_Items.Add("0"); var_Items.Add(5); var_Items.Add("10000.99");The following VFP sample shows how can I display the column using currency:
with thisform.List1 .Columns.Add("Currency").FormatColumn = "currency(dbl(value))" with .Items .Add("1.23") .Add("2.34") .Add("0") .Add(5) .Add("10000.99") endwith endwith