संपादित करें

इसके माध्यम से साझा किया गया


ObjectList.AllFields Property

Definition

Returns the collection of all fields from the ObjectList class, whether explicit or automatically generated. The default value is the collection of automatically generated fields. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public:
 property System::Web::UI::MobileControls::IObjectListFieldCollection ^ AllFields { System::Web::UI::MobileControls::IObjectListFieldCollection ^ get(); };
[System.ComponentModel.Bindable(false)]
[System.ComponentModel.Browsable(false)]
public System.Web.UI.MobileControls.IObjectListFieldCollection AllFields { get; }
[<System.ComponentModel.Bindable(false)>]
[<System.ComponentModel.Browsable(false)>]
member this.AllFields : System.Web.UI.MobileControls.IObjectListFieldCollection
Public ReadOnly Property AllFields As IObjectListFieldCollection

Property Value

An IObjectListFieldCollection object containing all fields in the ObjectList.

Attributes

Examples

The following code example demonstrates how to use the AllFields property to list all the fields of the ObjectList. This example is part of a larger example for the ObjectList overview.

private void AllFields_Click(object sender, EventArgs e)
{
    ActiveForm = Form5;
    string spec = "{0}: {1}<br/>";
    IObjectListFieldCollection flds = List1.AllFields;
    for (int i = 0; i < flds.Count; i++)
        TextView1.Text += 
            String.Format(spec, (i + 1), flds[i].Title);
}
Private Sub AllFields_Click(ByVal sender As Object, ByVal e As EventArgs)

    ActiveForm = Form5
    Dim spec As String = "{0}: {1}<br/>"
    Dim flds As IObjectListFieldCollection = List1.AllFields
    Dim i As Integer
    For i = 0 To flds.Count - 1
        TextView1.Text += _
            String.Format(spec, (i + 1), flds(i).Title)
    Next
End Sub

Remarks

This collection is available only after data binding. Unlike the Fields collection, you cannot add or remove items in this collection. By default, this collection is the set of automatically generated fields. If any fields are explicitly defined, they are contained after any automatically generated fields.

Applies to

See also