Intersoft WebCombo Documentation
InitializeRow Event
See Also  Example Send Feedback
ISNet.WebUI.WebCombo Namespace > WebCombo Class : InitializeRow Event






Occurs when a row is being initialized and about to be rendered.Manages delegates of the type ISNet.WebUI.WebGrid.RowEventHandler.

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute()>
<CategoryAttribute("Behavior")>
Public Event InitializeRow As RowEventHandler
Visual Basic (Usage)Copy Code
Dim instance As WebCombo
Dim handler As RowEventHandler
 
AddHandler instance.InitializeRow, handler
C# 
[DescriptionAttribute()]
[CategoryAttribute("Behavior")]
public event RowEventHandler InitializeRow
Delphi 
public event InitializeRow: RowEventHandler; 
JScript 
In JScript, you can handle the events defined by another class, but you cannot define your own.
Managed Extensions for C++ 
[DescriptionAttribute()]
[CategoryAttribute("Behavior")]
public: __event RowEventHandler* InitializeRow
C++/CLI 
[DescriptionAttribute()]
[CategoryAttribute("Behavior")]
public:
event RowEventHandler^ InitializeRow

Event Data

The event handler receives an argument of type RowEventArgs containing data related to this event. The following RowEventArgs properties provide information specific to this event.

PropertyDescription
ReturnValue (Inherited from ISNet.WebUI.WebCombo.BaseEventArgs) 
Row Gets the WebGridRow object used by the event. Gets the WebGridRow object used by the event.

Example

 

The following example shows you how to bind WebCombo using old databinding mode and modify the styles and contents of cell before it is rendered. In this example we modify the text color of Owner in ContactTitle cell to red color.
C#Copy Code
private void WebCombo1_InitializeDataSource(object sender, ISNet.WebUI.WebCombo.DataSourceEventArgs e)
{
    oleDbDataAdapter1.Fill(dataSet11.Customers);
    e.DataSource = dataSet11;
}

protected void WebCombo1_InitializeRow(object sender, ISNet.WebUI.WebCombo.RowEventArgs e)
{
     WebComboCell contactTitle = e.Row.Cells.GetNamedItem("ContactTitle");

     if (contactTitle.Text == "Owner")
     contactTitle.Style.ForeColor = Color.Red;
}

Remarks

The InitializeRow event allow you to modify the cell's content and styles before it goes to rendering. This is especially useful to write Custom Column, validate a specific condition and add rich HTML-based contents.

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.