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

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

AutoGeneratedFieldProperties.Type プロパティ

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

AutoGeneratedFieldProperties オブジェクト表示される値のデータ型取得または設定します

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

Dim instance As AutoGeneratedFieldProperties
Dim value As Type

value = instance.Type

instance.Type = value
/** @property */
public Type get_Type ()

/** @property */
public void set_Type (Type value)

プロパティ
AutoGeneratedFieldProperties オブジェクト表示される値のデータ型を表す Type既定値null 参照 (Visual Basic では Nothing) です。このプロパティ設定されていないことを示します

解説解説
使用例使用例

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

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 名前空間
Type



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS