DataGridColumnStyle.PropertyDescriptor プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As DataGridColumnStyle Dim value As PropertyDescriptor value = instance.PropertyDescriptor instance.PropertyDescriptor = value
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

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からDataGridColumnStyle.PropertyDescriptor プロパティを検索する場合は、下記のリンクをクリックしてください。

- DataGridColumnStyle.PropertyDescriptor プロパティのページへのリンク