Back to Devexpress

ASPxNewsControl.ItemDataBound Event

aspnet-devexpress-dot-web-dot-aspxnewscontrol-606094f7.md

latest2.1 KB
Original Source

ASPxNewsControl.ItemDataBound Event

Occurs after an item has been bound to a data source.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public event NewsItemEventHandler ItemDataBound
vb
Public Event ItemDataBound As NewsItemEventHandler

Event Data

The ItemDataBound event's data class is NewsItemEventArgs. The following properties provide information specific to this event:

PropertyDescription
ItemGets the item currently being processed.

Remarks

The ItemDataBound event is raised for each item after it’s data bound to the corresponding data from the specified data source. This event enables you to customize settings of the related item before it is finally rendered. Handling the ItemDataBound event correctly you can, for example, implement a custom logic to dynamically map properties of a news control’s items to the required data fields.

The processed news item can be accessed by using the NewsItemEventArgs.Item property of the event’s argument.

csharp
protected void ASPxNewsControl1_ItemDataBound(object source, NewsItemEventArgs e) {
    e.Item.Text = e.Item.Text.ToUpper();
}

If the control functions in unbound mode, the ItemDataBound event isn’t raised.

See Also

DataItem

News Control

ASPxNewsControl Class

ASPxNewsControl Members

DevExpress.Web Namespace