BindingManagerBase.GetItemProperties Method (Type, Int32, ArrayList, ArrayList)

Gets the list of properties of the items managed by this BindingManagerBase.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

protected virtual PropertyDescriptorCollection GetItemProperties (
	Type listType,
	int offset,
	ArrayList dataSources,
	ArrayList listAccessors
)
protected PropertyDescriptorCollection GetItemProperties (
	Type listType, 
	int offset, 
	ArrayList dataSources, 
	ArrayList listAccessors
)
protected function GetItemProperties (
	listType : Type, 
	offset : int, 
	dataSources : ArrayList, 
	listAccessors : ArrayList
) : PropertyDescriptorCollection

Parameters

listType

The Type of the bound list.

offset

A counter used to recursively call the method.

dataSources

An ArrayList containing the data sources.

listAccessors

An ArrayList containing the table's bound properties.

Return Value

A PropertyDescriptorCollection that represents the property descriptors for the binding.

This overload is used by developers to create data-bound controls.

The following code example uses the GetItemProperties method to return a PropertyDescriptorCollection for a BindingManagerBase. The example then prints out the Name and PropertyType of each PropertyDescriptor in the collection.

private void PrintPropertyDescriptions(BindingManagerBase b)
{
   Console.WriteLine("Printing Property Descriptions");
   PropertyDescriptorCollection ps = b.GetItemProperties();
   for(int i = 0; i < ps.Count; i++)
   {
      Console.WriteLine("\t" + ps[i].Name + "\t" + ps[i].PropertyType);
   }
}


private void PrintPropertyDescriptions(BindingManagerBase b)
{
    Console.WriteLine("Printing Property Descriptions");
    PropertyDescriptorCollection ps = b.GetItemProperties();
    for (int i = 0; i < ps.get_Count(); i++) {
        Console.WriteLine(("\t" + ps.get_Item(i).get_Name()  
            + "\t" + ps.get_Item(i).get_PropertyType()));
    }
} //PrintPropertyDescriptions

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.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show: