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






Gets the collection of the WebGridCell objects.

Syntax

Visual Basic (Declaration) 
<NotifyParentPropertyAttribute(True)>
<DescriptionAttribute()>
<PersistenceModeAttribute(PersistenceMode.InnerProperty)>
<DefaultValueAttribute()>
Public ReadOnly Property Cells As WebGridCellCollection
Visual Basic (Usage)Copy Code
Dim instance As WebGridRow
Dim value As WebGridCellCollection
 
value = instance.Cells
C# 
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute()]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
[DefaultValueAttribute()]
public WebGridCellCollection Cells {get;}
Delphi 
public read-only property Cells: WebGridCellCollection; 
JScript 
NotifyParentPropertyAttribute()
DescriptionAttribute()
PersistenceModeAttribute(PersistenceMode.InnerProperty)
DefaultValueAttribute()
public function get Cells : WebGridCellCollection
Managed Extensions for C++ 
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute()]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
[DefaultValueAttribute()]
public: __property WebGridCellCollection* get_Cells();
C++/CLI 
[NotifyParentPropertyAttribute(true)]
[DescriptionAttribute()]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
[DefaultValueAttribute()]
public:
property WebGridCellCollection^ Cells {
   WebGridCellCollection^ get();
}

Example

 

The following example shows you how to change the color of text in cell that contain UK to red.
C#Copy Code
private void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
{
    if (e.Row.Type == RowType.Record) 
    {
       if (e.Row.Cells.GetNamedItem("Country").Text == "UK")
       e.Row.Cells.GetNamedItem("Country").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.