GridColumnStylesCollection.Item Property (PropertyDescriptor)
Assembly: System.Windows.Forms (in system.windows.forms.dll)
/** @property */ public DataGridColumnStyle get_Item (PropertyDescriptor propertyDesciptor)
JScript supports the use of indexed properties, but not the declaration of new ones.
Parameters
- propertyDesciptor
The PropertyDescriptor associated with the DataGridColumnStyle.
Property Value
The DataGridColumnStyle associated the specified PropertyDescriptor.Each DataGridColumnStyle is created using a PropertyDescriptor. The PropertyDescriptor can be returned using the PropertyDescriptor property.
To get the PropertyDescriptorCollection for a specific data source, use the GetItemProperties method of the BindingManagerBase class. Pass the MappingName to the Item property of the PropertyDescriptorCollection to return a PropertyDescriptor for a specific column.
The following code example gets a DataColumn from a DataTable in a DataSet, and then passes it as an argument to the Add method.
function ContainsThisDataCol(){ var myPropertyDescriptorCollection : PropertyDescriptorCollection = this.BindingContext(DataSet1, "Customers").GetItemProperties(); var myPropertyDescriptor : PropertyDescriptor = myPropertyDescriptorCollection("FirstName"); var myDataGridColumnStyle : DataGridColumnStyle = DataGrid1.TableStyles[0].GridColumnStyles[myPropertyDescriptor]; }
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
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.