GridView.RowDataBound Event
Assembly: System.Web (in system.web.dll)
public: event GridViewRowEventHandler^ RowDataBound { void add (GridViewRowEventHandler^ value); void remove (GridViewRowEventHandler^ value); }
/** @event */ public void add_RowDataBound (GridViewRowEventHandler value) /** @event */ public void remove_RowDataBound (GridViewRowEventHandler value)
JScript supports the use of events, but not the declaration of new ones.
Before the GridView control can be rendered, each row in the control must be bound to a record in the data source. The RowDataBound event is raised when a data row (represented by a GridViewRow object) is bound to data in the GridView control. This allows you to provide an event-handling method that performs a custom routine, such as modifying the values of the data bound to the row, whenever this event occurs.
A GridViewRowEventArgs object is passed to the event-handling method, which allows you to access the properties of the row being bound. To access a specific cell in the row, use the Cells property of the GridViewRowEventArgs object. You can determine which row type (header row, data row, and so on) is being bound by using the RowType property.
For more information about handling events, see Consuming Events.
| Topic | Location |
|---|---|
| How to: Set GridView Web Server Control Column Width Dynamically | Building ASP .NET Web Applications |
| How to: Set GridView Web Server Control Column Width Dynamically | Building ASP .NET Web Applications |
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.