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






Gets or sets the style applied to the cell object.

Syntax

Visual Basic (Declaration) 
<DefaultValueAttribute()>
<PersistenceModeAttribute(PersistenceMode.InnerProperty)>
<DescriptionAttribute("Gets or sets the style applied to the cell object.")>
<TypeConverterAttribute("System.ComponentModel.ExpandableObjectConverter, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")>
<NotifyParentPropertyAttribute(True)>
Public Property Style As WebGridFormatStyle
Visual Basic (Usage)Copy Code
Dim instance As WebGridCell
Dim value As WebGridFormatStyle
 
instance.Style = value
 
value = instance.Style
C# 
[DefaultValueAttribute()]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
[DescriptionAttribute("Gets or sets the style applied to the cell object.")]
[TypeConverterAttribute("System.ComponentModel.ExpandableObjectConverter, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
[NotifyParentPropertyAttribute(true)]
public WebGridFormatStyle Style {get; set;}
Delphi 
public read-write property Style: WebGridFormatStyle; 
JScript 
DefaultValueAttribute()
PersistenceModeAttribute(PersistenceMode.InnerProperty)
DescriptionAttribute("Gets or sets the style applied to the cell object.")
TypeConverterAttribute("System.ComponentModel.ExpandableObjectConverter, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
NotifyParentPropertyAttribute()
public function get,set Style : WebGridFormatStyle
Managed Extensions for C++ 
[DefaultValueAttribute()]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
[DescriptionAttribute("Gets or sets the style applied to the cell object.")]
[TypeConverterAttribute("System.ComponentModel.ExpandableObjectConverter, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
[NotifyParentPropertyAttribute(true)]
public: __property WebGridFormatStyle* get_Style();
public: __property void set_Style( 
   WebGridFormatStyle* value
);
C++/CLI 
[DefaultValueAttribute()]
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
[DescriptionAttribute("Gets or sets the style applied to the cell object.")]
[TypeConverterAttribute("System.ComponentModel.ExpandableObjectConverter, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
[NotifyParentPropertyAttribute(true)]
public:
property WebGridFormatStyle^ Style {
   WebGridFormatStyle^ get();
   void set (    WebGridFormatStyle^ value);
}

Example

The following example shows you how to change the background color of a cell that contain Madrid to orange color.
C#Copy Code
private void WebGrid1_InitializeRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
{
    if (e.Row.Cells.GetNamedItem("City").Text == "Madrid")
    e.Row.Cells.GetNamedItem("City").Style.BackColor = Color.Orange;
}

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.