Gets or sets a formatted text.

Namespace: Dapfor.Net.Ui
Assembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)

Syntax

C#
public string Text { get; set; }
Visual Basic
Public Property Text As String
	Get
	Set
Visual C++
public:
property String^ Text {
	String^ get ();
	void set (String^ value);
}
F#
member Text : string with get, set

Property Value

Type: String
The formatted text.

Remarks

Firstly the Cell takes a value from IDataField returned by DataField property. Then it applies a IFormat to transform returned value to string.

Examples

 Copy imageCopy
//Some product
class Product
{
    private double price;

    [DoubleFormat(2, true, false)]
    public double Price
    {
        get { return price; }
        set { price = value; }
    }
}

public void CellText(Grid grid)
{
    Product product = new Product();
    grid.Rows.Add(product);
    Row row = grid.Rows[0];

    product.Price = 1246078.656542;
    Console.WriteLine("Price value = {0}", row["Price"].Value);
    Console.WriteLine("Price text = {0}", row["Price"].Text);
}

Thread Safety

The property is thread-safe. The synchronization happens in the synchronious way with blocking the calling thread.

See Also