Редагувати

Поділитися через


ListDataBindEventArgs Class

Definition

Caution

The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.

Provides parameters for an ItemDataBind event. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public ref class ListDataBindEventArgs : EventArgs
public class ListDataBindEventArgs : EventArgs
[System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")]
public class ListDataBindEventArgs : EventArgs
type ListDataBindEventArgs = class
    inherit EventArgs
[<System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")>]
type ListDataBindEventArgs = class
    inherit EventArgs
Public Class ListDataBindEventArgs
Inherits EventArgs
Inheritance
ListDataBindEventArgs
Attributes

Examples

The following code example demonstrates how to use the ItemDataBind event to get the starting totals of status settings for the list. This code is part of a larger example for the List overview.

private void Status_DataBinding(object sender, 
    ListDataBindEventArgs e)
{
    // Increment initial counts
    switch (e.ListItem.Value)
    {
        case "done":
            doneCount += 1;
            break;
        case "scheduled":
            schedCount += 1;
            break;
        case "pending":
            pendCount += 1;
            break;
    }
}
Private Sub Status_DataBinding(ByVal sender As Object, _
    ByVal e As ListDataBindEventArgs)

    ' Increment initial counts
    Select Case e.ListItem.Value
        Case "done"
            doneCount += 1
        Case "scheduled"
            schedCount += 1
        Case "pending"
            pendCount += 1
    End Select
End Sub

Constructors

ListDataBindEventArgs(MobileListItem, Object)

Initializes a new instance of the ListDataBindEventArgs class. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Properties

DataItem

Gets the specified data object of the list item that is being bound. This property is available only on a request where the list item is data bound; on subsequent postbacks, it is always null. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

ListItem

Returns the current ListItem that is being bound. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also