Intersoft WebGrid Documentation
Text Property
See Also  Example Send Feedback
ISNet.WebUI.WebGrid Namespace > WebGridCell Class : Text Property






Gets or sets the text that will be displayed in cell.

Syntax

Visual Basic (Declaration) 
<DefaultValueAttribute()>
<ISNet.Serialization.BinarySerializableAttribute()>
<NotifyParentPropertyAttribute(True)>
<DescriptionAttribute("Gets or sets the text that will be displayed in cell.")>
Public Property Text As String
Visual Basic (Usage)Copy Code
Dim instance As WebGridCell
Dim value As String
 
instance.Text = value
 
value = instance.Text
C# 
[DefaultValueAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute("Gets or sets the text that will be displayed in cell.")]
public string Text {get; set;}
Delphi 
public read-write property Text: String; 
JScript 
DefaultValueAttribute()
ISNet.Serialization.BinarySerializableAttribute()
NotifyParentPropertyAttribute()
DescriptionAttribute("Gets or sets the text that will be displayed in cell.")
public function get,set Text : String
Managed Extensions for C++ 
[DefaultValueAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute("Gets or sets the text that will be displayed in cell.")]
public: __property string* get_Text();
public: __property void set_Text( 
   string* value
);
C++/CLI 
[DefaultValueAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute("Gets or sets the text that will be displayed in cell.")]
public:
property String^ Text {
   String^ get();
   void set (    String^ value);
}

Example

The following example shows you how to change the color of text in cell that contain ANATR to red
C#Copy Code
private void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
{
       if (e.Row.Cells.GetNamedItem("CustomerID").Text == "ANATR")
       e.Row.Cells.GetNamedItem("CustomerID").Style.ForeColor = Color.Red;
}

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.