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

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

DataGridColumnStyle.PropertyDescriptor プロパティ

DataGridColumnStyle によって表示されデータ属性判断する PropertyDescriptor を取得または設定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Overridable Property
 PropertyDescriptor As PropertyDescriptor
Dim instance As DataGridColumnStyle
Dim value As PropertyDescriptor

value = instance.PropertyDescriptor

instance.PropertyDescriptor = value
public virtual PropertyDescriptor PropertyDescriptor { get;
 set; }
public:
virtual property PropertyDescriptor^ PropertyDescriptor {
    PropertyDescriptor^ get ();
    void set (PropertyDescriptor^ value);
}
/** @property */
public PropertyDescriptor get_PropertyDescriptor ()

/** @property */
public void set_PropertyDescriptor (PropertyDescriptor
 value)
public function get PropertyDescriptor
 () : PropertyDescriptor

public function set PropertyDescriptor
 (value : PropertyDescriptor)

プロパティ
列の属性に関するデータ格納している PropertyDescriptor

解説解説

列の PropertyDescriptor は、BindingManagerBase の GetItemProperties メソッド使用して設定しますPropertyDescriptor使用して新しDataGridColumnStyle作成する例については、DataGridColumnStyle コンストラクタトピック参照してください

使用例使用例

GridColumnStylesCollection にある列の PropertyDescriptor取得するコード例次に示します。例では、PropertyDescriptor使用して新しDataGridColumnStyle作成します

Private Sub GetPropertyDescriptor()
    Dim pd As PropertyDescriptor
    pd = dataGrid1.TableStyles(0).GridColumnStyles(0).PropertyDescriptor
    Console.WriteLine(pd.ToString())
End Sub 'GetPropertyDescriptor


Private Sub CreateNewDataGridColumnStyle()
    Dim myGridColumnCol As GridColumnStylesCollection
    myGridColumnCol = dataGrid1.TableStyles(0).GridColumnStyles
    ' Get the CurrencyManager for the table you want to add a column
 to.
    Dim myCurrencyManager As CurrencyManager
 = CType(Me.BindingContext(ds.Tables("Suppliers")),
 CurrencyManager)
    ' Get the PropertyDescriptor for the DataColumn of the new column.
    Dim pd As PropertyDescriptor = myCurrencyManager.GetItemProperties()("City")
    Dim myColumn As New
 DataGridTextBoxColumn(pd)
    myGridColumnCol.Add(myColumn)
End Sub 'CreateNewDataGridColumnStyle
private void GetPropertyDescriptor()
{
    PropertyDescriptor pd;
    pd = dataGrid1.TableStyles[0].GridColumnStyles[0].PropertyDescriptor;
    Console.WriteLine(pd.ToString());
}
 
private void CreateNewDataGridColumnStyle()
{
    GridColumnStylesCollection myGridColumnCol;
    myGridColumnCol = dataGrid1.TableStyles[0].GridColumnStyles;
    // Get the CurrencyManager for the table you want to add a column
 to.
    CurrencyManager myCurrencyManager = (CurrencyManager)this.BindingContext[ds.Tables["Suppliers"]];
    // Get the PropertyDescriptor for the DataColumn of the new column.
    PropertyDescriptor pd = myCurrencyManager.GetItemProperties()["City"];
    DataGridColumnStyle myColumn = new DataGridTextBoxColumn(pd);
    myGridColumnCol.Add(myColumn);
 }

private:
   void GetPropertyDescriptor()
   {
      PropertyDescriptor^ pd;
      pd = dataGrid1->TableStyles[ 0 ]->GridColumnStyles[ 0 ]->PropertyDescriptor;
      Console::WriteLine( pd );
   }

   void CreateNewDataGridColumnStyle()
   {
      GridColumnStylesCollection^ myGridColumnCol;
      myGridColumnCol = dataGrid1->TableStyles[ 0 ]->GridColumnStyles;
      
      // Get the CurrencyManager for the table you want to add a column
 to.
      CurrencyManager^ myCurrencyManager = dynamic_cast<CurrencyManager^>(this->BindingContext[
 ds->Tables[ "Suppliers" ] ]);
      
      // Get the PropertyDescriptor for the DataColumn of the new column.
      PropertyDescriptor^ pd = myCurrencyManager->GetItemProperties()[ "City"
 ];
      DataGridColumnStyle^ myColumn = gcnew DataGridTextBoxColumn( pd );
      myGridColumnCol->Add( myColumn );
   }

private void GetPropertyDescriptor()
{
    PropertyDescriptor pd;
    pd = dataGrid1.get_TableStyles().get_Item(0).
        get_GridColumnStyles().get_Item(0).get_PropertyDescriptor();
    Console.WriteLine(pd.ToString());
} //GetPropertyDescriptor

private void CreateNewDataGridColumnStyle()
{
    GridColumnStylesCollection myGridColumnCol;
    myGridColumnCol = dataGrid1.get_TableStyles().get_Item(0).
        get_GridColumnStyles();
    // Get the CurrencyManager for the table you want to add a column
 to.
    CurrencyManager myCurrencyManager = 
        (CurrencyManager)(this.get_BindingContext().
        get_Item(ds.get_Tables().get_Item("Suppliers")));
    // Get the PropertyDescriptor for the DataColumn of the new column.
    PropertyDescriptor pd = myCurrencyManager.GetItemProperties().
        get_Item("City");
    DataGridColumnStyle myColumn = new DataGridTextBoxColumn(pd);
    myGridColumnCol.Add(myColumn);
} //CreateNewDataGridColumnStyle
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridColumnStyle クラス
DataGridColumnStyle メンバ
System.Windows.Forms 名前空間
Caption
ColumnName
DataType
DataColumn


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

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

辞書ショートカット

すべての辞書の索引

「DataGridColumnStyle.PropertyDescriptor プロパティ」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS