ObjectList.AllFields プロパティ

定義

ObjectList クラスからすべてのフィールドのコレクションを返します。明示的に生成されたフィールドと自動生成されたフィールドの両方が対象になります。 明示的に生成されたフィールドがなければ、自動生成されたフィールドのコレクションが既定の値として返されます。 この API は、互換性のために残されています。 ASP.NET モバイル アプリケーションを開発する方法については、「ASP.NET を使用した Mobile Apps & サイト」を参照してください。

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

プロパティ値

IObjectListFieldCollection 内のすべてのフィールドを格納している ObjectList オブジェクト。

属性

次のコード例では、 プロパティを使用して、 AllFields のすべてのフィールドを一覧表示する方法を ObjectList示します。 この例は、概要の大きな例の ObjectList 一部です。

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

注釈

このコレクションは、データ バインディング後にのみ使用できます。 Fieldsコレクションとは異なり、このコレクション内の項目を追加または削除することはできません。 既定では、このコレクションは自動的に生成されるフィールドのセットです。 フィールドが明示的に定義されている場合は、自動的に生成されたフィールドの後に含まれます。

適用対象

こちらもご覧ください