Back to Devexpress

ListBoxItemRowPreparedEventArgs Class

aspnet-devexpress-dot-web-a75778ac.md

latest2.2 KB
Original Source

ListBoxItemRowPreparedEventArgs Class

Provides data for the editor’s ItemRowPrepared event.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class ListBoxItemRowPreparedEventArgs :
    EventArgs
vb
Public Class ListBoxItemRowPreparedEventArgs
    Inherits EventArgs

ListBoxItemRowPreparedEventArgs is the data class for the following events:

Remarks

Objects of the ListBoxItemRowPreparedEventArgs type are used as arguments for the editor’s ItemRowPrepared event generated on the server side.

ListBoxItemRowPreparedEventArgs objects with proper settings are automatically created and passed to the corresponding event handlers.

Example

Web Forms:

aspx
<dx:ASPxListBox ID="ASPxListBox1" runat="server" 
OnItemRowPrepared="ASPxListBox1_ItemRowPrepared" DataSourceID="SqlDataSource1">
    <Columns>
        ...
    </Columns>
</dx:ASPxListBox>
...
csharp
protected void ASPxListBox1_ItemRowPrepared(object sender, DevExpress.Web.ListBoxItemRowPreparedEventArgs e)
{
    ...
    e.Row.Attributes.Add("attr-name", e.Item.Value.ToString());
}

MVC:

csharp
settings.ItemRowPrepared = (sender, e) =>
{
    ...
    e.Row.Attributes.Add("attr-name", e.Item.Value.ToString());
};

Inheritance

Object EventArgs ListBoxItemRowPreparedEventArgs

See Also

ListBoxItemRowPreparedEventArgs Members

DevExpress.Web Namespace