AutoGeneratedFieldProperties.Name プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > AutoGeneratedFieldProperties.Name プロパティの意味・解説 

AutoGeneratedFieldProperties.Name プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

AutoGeneratedField オブジェクトの名前を取得または設定します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

解説解説

Name プロパティ使用してAutoGeneratedField オブジェクトの名前を指定します多く場合、名前に指定するのは、AutoGeneratedField オブジェクトバインドされたフィールドの名前です。このプロパティの値は、DetailsView コントロールまたは GridView コントロールAutoGeneratedField オブジェクトヘッダー セクションにも表示されます。

使用例使用例

Name プロパティ使用してAutoGeneratedField オブジェクトの HeaderText プロパティ設定する値を決定する方法次のコード例示します

Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Security.Permissions
Imports System.Web

Namespace Samples.AspNet.VB.Controls

    <AspNetHostingPermission(SecurityAction.Demand, Level:=AspNetHostingPermissionLevel.Minimal),
 AspNetHostingPermission(SecurityAction.InheritanceDemand, Level:=AspNetHostingPermissionLevel.Minimal)>
 Public Class SimpleCustomControl
        Inherits System.Web.UI.WebControls.DetailsView

        Protected Overrides Function
 CreateAutoGeneratedRow(ByVal fieldProperties As
 AutoGeneratedFieldProperties) As AutoGeneratedField

            ' Create an AutoGeneratedField object.
            Dim field As New
 AutoGeneratedField(fieldProperties.DataField)

            ' Set the properties of the AutoGeneratedField using
            ' the values from the AutoGeneratedFieldProperties 
            ' object contained in the fieldProperties parameter.
            CType(field, IStateManager).TrackViewState()
            field.HeaderText = fieldProperties.Name
            field.SortExpression = fieldProperties.Name
            field.ReadOnly = fieldProperties.IsReadOnly
            field.DataType = fieldProperties.Type

            Return field

        End Function

    End Class

End Namespace

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Security.Permissions;
using System.Web;

namespace Samples.AspNet.CS.Controls
{
      
    [AspNetHostingPermission(SecurityAction.Demand, Level=AspNetHostingPermissionLevel.Minimal)]
    [AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
    public class SimpleCustomControl : DetailsView
    {

        protected override AutoGeneratedField CreateAutoGeneratedRow(AutoGeneratedFieldProperties
 fieldProperties) 
        {

            // Create an AutoGeneratedField object.
            AutoGeneratedField field = new AutoGeneratedField(fieldProperties.DataField);

            // Set the properties of the AutoGeneratedField using
            // the values from the AutoGeneratedFieldProperties 
            // object contained in the fieldProperties parameter.
            ((IStateManager)field).TrackViewState();
            field.HeaderText = fieldProperties.Name;
            field.SortExpression = fieldProperties.Name;
            field.ReadOnly = fieldProperties.IsReadOnly;
            field.DataType = fieldProperties.Type;

            return field;
        }
        
    }
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
AutoGeneratedFieldProperties クラス
AutoGeneratedFieldProperties メンバ
System.Web.UI.WebControls 名前空間
AutoGeneratedFieldProperties.DataField プロパティ


このページでは「.NET Framework クラス ライブラリ リファレンス」からAutoGeneratedFieldProperties.Name プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からAutoGeneratedFieldProperties.Name プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からAutoGeneratedFieldProperties.Name プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

AutoGeneratedFieldProperties.Name プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



AutoGeneratedFieldProperties.Name プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS