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

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

AutoGeneratedFieldProperties.IsReadOnly プロパティ

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

AutoGeneratedField オブジェクト表示される値を編集モード変更できるかどうかを示す値を取得または設定します

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

Dim instance As AutoGeneratedFieldProperties
Dim value As Boolean

value = instance.IsReadOnly

instance.IsReadOnly = value
public bool IsReadOnly { get;
 set; }
/** @property */
public boolean get_IsReadOnly ()

/** @property */
public void set_IsReadOnly (boolean value)

プロパティ
値が読み取り専用場合trueそれ以外場合false既定値false です。

解説解説
使用例使用例

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

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 名前空間
BoundField.ReadOnly


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS