Tab
A newer version of this page is available. Switch to the current version.

ListBoxItemRowPreparedEventArgs Class

Provides data for the editor’s ItemRowPrepared event.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

public class ListBoxItemRowPreparedEventArgs :
    EventArgs

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:

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

MVC:

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

Inheritance

Object
EventArgs
ListBoxItemRowPreparedEventArgs
See Also