menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ListUtil - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ListUtil

    Provides helper routines for exploring properties in a collection. Essential Grid uses this routine to find out about columns and relations to be displayed in the grid when a collection is specified as datasource.

    Inheritance
    System.Object
    ListUtil
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Collections
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class ListUtil

    Constructors

    ListUtil()

    Declaration
    public ListUtil()

    Methods

    GetAllowRemove(IList)

    Checks IBindingList.AllowRemove for IBindingList or IList.IsReadOnly and IList.IsFixedSize for IList collections.

    Declaration
    public static bool GetAllowRemove(IList list)
    Parameters
    Type Name Description
    System.Collections.IList list
    Returns
    Type
    System.Boolean

    GetDataColumn(PropertyDescriptor)

    Returns the System.Data.DataColumn of the System.ComponentModel.PropertyDescriptor if it is a DataColumnPropertyDescriptor.

    Declaration
    public static DataColumn GetDataColumn(PropertyDescriptor pd)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor pd
    Returns
    Type
    System.Data.DataColumn

    GetDataRelation(PropertyDescriptor)

    Returns the PropertyDescriptorCollection for the relation or nested collection.

    Declaration
    public static DataRelation GetDataRelation(PropertyDescriptor pd)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor pd
    Returns
    Type
    System.Data.DataRelation

    GetDataTable(Object)

    Determines and returns the DataTable object for the given list.

    Declaration
    public static DataTable GetDataTable(object list)
    Parameters
    Type Name Description
    System.Object list
    Returns
    Type
    System.Data.DataTable

    GetItemProperties(Object)

    Returns the properties for the object.

    Declaration
    public static PropertyDescriptorCollection GetItemProperties(object dataSource)
    Parameters
    Type Name Description
    System.Object dataSource
    Returns
    Type
    System.ComponentModel.PropertyDescriptorCollection

    GetItemProperties(Type)

    Returns the properties for the specified type.

    Declaration
    public static PropertyDescriptorCollection GetItemProperties(Type type)
    Parameters
    Type Name Description
    System.Type type
    Returns
    Type
    System.ComponentModel.PropertyDescriptorCollection

    GetItemValue(Object, String, Object)

    Returns the value for the ValueMember of the specified item.

    Declaration
    public static object GetItemValue(object dataSource, string valueMember, object item)
    Parameters
    Type Name Description
    System.Object dataSource

    The list

    System.String valueMember

    The name of the value member

    System.Object item

    The row item.

    Returns
    Type Description
    System.Object

    The value of the ValueMember.

    GetListItemType(Object)

    Returns the type of the items in the list if the list is strong-typed.

    Declaration
    public static Type GetListItemType(object list)
    Parameters
    Type Name Description
    System.Object list
    Returns
    Type
    System.Type

    GetListItemType(Type)

    Returns the type of the items in the list if the list is strong-typed.

    Declaration
    public static Type GetListItemType(Type list)
    Parameters
    Type Name Description
    System.Type list
    Returns
    Type
    System.Type

    GetListName(Object)

    Declaration
    public static string GetListName(object list)
    Parameters
    Type Name Description
    System.Object list
    Returns
    Type
    System.String

    GetRelatedDataRelation(PropertyDescriptor)

    Declaration
    public static DataRelation GetRelatedDataRelation(PropertyDescriptor pd)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor pd
    Returns
    Type
    System.Data.DataRelation

    GetRelatedDataTable(PropertyDescriptor)

    Returns the System.Data.DataRelation.ChildTable or DataTable of the System.ComponentModel.PropertyDescriptor

    Declaration
    public static DataTable GetRelatedDataTable(PropertyDescriptor pd)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor pd
    Returns
    Type
    System.Data.DataTable

    GetRelatedItemProperties(PropertyDescriptor)

    Overloaded. Returns the PropertyDescriptorCollection for the relation or nested collection.

    Declaration
    public static PropertyDescriptorCollection GetRelatedItemProperties(PropertyDescriptor pd)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor pd
    Returns
    Type
    System.ComponentModel.PropertyDescriptorCollection

    GetRelatedItemProperties(PropertyDescriptor, out String)

    Returns the PropertyDescriptorCollection for the relation or nested collection.

    Declaration
    public static PropertyDescriptorCollection GetRelatedItemProperties(PropertyDescriptor pd, out string name)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor pd
    System.String name
    Returns
    Type
    System.ComponentModel.PropertyDescriptorCollection

    GetRelatedItemProperties(Object, PropertyDescriptor, out String, out Object)

    Returns the PropertyDescriptorCollection for the relation or nested collection.

    Declaration
    public static PropertyDescriptorCollection GetRelatedItemProperties(object parentItemList, PropertyDescriptor pd, out string name, out object arrayList)
    Parameters
    Type Name Description
    System.Object parentItemList
    System.ComponentModel.PropertyDescriptor pd
    System.String name
    System.Object arrayList
    Returns
    Type
    System.ComponentModel.PropertyDescriptorCollection

    GetRelatedList(PropertyDescriptor)

    Returns the System.Data.DataRelation.ChildTable or DataTable of the System.ComponentModel.PropertyDescriptor

    Declaration
    public static IList GetRelatedList(PropertyDescriptor pd)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor pd
    Returns
    Type
    System.Collections.IList

    GetSortDirection(IList)

    Checks IBindingList.SortDirection.

    Declaration
    public static ListSortDirection GetSortDirection(IList list)
    Parameters
    Type Name Description
    System.Collections.IList list
    Returns
    Type
    System.ComponentModel.ListSortDirection

    GetSortProperty(IList)

    Checks IBindingList.SortProperty.

    Declaration
    public static PropertyDescriptor GetSortProperty(IList list)
    Parameters
    Type Name Description
    System.Collections.IList list

    The list to check.

    Returns
    Type
    System.ComponentModel.PropertyDescriptor

    GetStandardValuesExclusive(PropertyDescriptor)

    Declaration
    public static bool GetStandardValuesExclusive(PropertyDescriptor pd)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor pd
    Returns
    Type
    System.Boolean

    IsComplexType(PropertyDescriptor)

    Indicates whether the specified PropertyDescriptor has nested properties.

    Declaration
    public static bool IsComplexType(PropertyDescriptor pd)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor pd

    The PropertyDescriptor to be checked.

    Returns
    Type Description
    System.Boolean

    True if nested properties are found; False otherwise.

    IsComplexType(Type)

    Indicates whether the specified Type has nested properties.

    Declaration
    public static bool IsComplexType(Type t)
    Parameters
    Type Name Description
    System.Type t

    The Type to be checked.

    Returns
    Type Description
    System.Boolean

    True if nested properties are found; False otherwise.

    IsEqualItemProperties(PropertyDescriptorCollection, PropertyDescriptorCollection)

    Compares the two PropertyDescriptorCollection and indicates whether they are equal.

    Declaration
    public static bool IsEqualItemProperties(PropertyDescriptorCollection x, PropertyDescriptorCollection y)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptorCollection x
    System.ComponentModel.PropertyDescriptorCollection y
    Returns
    Type
    System.Boolean

    PropertyDescriptorIsARelation(PropertyDescriptor)

    Indicates whether the property represents a relation or nested collection.

    Declaration
    public static bool PropertyDescriptorIsARelation(PropertyDescriptor prop)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor prop
    Returns
    Type
    System.Boolean

    RegisterNonComplexType(Type)

    Lets you register additional types that should return false when IsComplexType(PropertyDescriptor) is called.

    Declaration
    public static void RegisterNonComplexType(Type t)
    Parameters
    Type Name Description
    System.Type t

    SetSort(IList, PropertyDescriptor, ListSortDirection)

    Calls IBindingList.ApplySort.

    Declaration
    public static void SetSort(IList list, PropertyDescriptor property, ListSortDirection sortDirection)
    Parameters
    Type Name Description
    System.Collections.IList list

    List to be sorted.

    System.ComponentModel.PropertyDescriptor property
    System.ComponentModel.ListSortDirection sortDirection

    SupportsSort(IList)

    Checks IBindingList.SupportsSorting.

    Declaration
    public static bool SupportsSort(IList list)
    Parameters
    Type Name Description
    System.Collections.IList list
    Returns
    Type
    System.Boolean
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved