Xceed Grid for WinForms v4.3 Documentation
Xceed.Grid.v4.3 Assembly / Xceed.Editors Namespace / WinComboBox Class / WinComboBox Constructor / WinComboBox Constructor(Object,String,String,String,ImagePosition,Size,String)
The data source used to populate the combobox.
The table to bind to within the dataSource.
The field of the dataSource from which to draw the value.
The field of the dataSource from which to draw the image.
The position of the image in the WinComboBox.
The size of the image.
The format with which the SelectedItem is displayed in the combobox.


In This Topic
    WinComboBox Constructor(Object,String,String,String,ImagePosition,Size,String)
    In This Topic
    Initializes a new instance of the ComboBoxEditor class specifying its data binding information.
    Syntax
    'Declaration
     
    Public Function New( _
       ByVal dataSource As Object, _
       ByVal dataMember As String, _
       ByVal valueMember As String, _
       ByVal imageMember As String, _
       ByVal imagePosition As ImagePosition, _
       ByVal imageSize As Size, _
       ByVal displayFormat As String _
    )
    'Usage
     
    Dim dataSource As Object
    Dim dataMember As String
    Dim valueMember As String
    Dim imageMember As String
    Dim imagePosition As ImagePosition
    Dim imageSize As Size
    Dim displayFormat As String
     
    Dim instance As New WinComboBox(dataSource, dataMember, valueMember, imageMember, imagePosition, imageSize, displayFormat)
    public WinComboBox( 
       object dataSource,
       string dataMember,
       string valueMember,
       string imageMember,
       ImagePosition imagePosition,
       Size imageSize,
       string displayFormat
    )

    Parameters

    dataSource
    The data source used to populate the combobox.
    dataMember
    The table to bind to within the dataSource.
    valueMember
    The field of the dataSource from which to draw the value.
    imageMember
    The field of the dataSource from which to draw the image.
    imagePosition
    The position of the image in the WinComboBox.
    imageSize
    The size of the image.
    displayFormat
    The format with which the SelectedItem is displayed in the combobox.
    Remarks

    Only the column names specified by displayFormat and the valueMember parameters will be created in the dropdown. For example, setting displayFormat to "%FirstName% %LastName%" will result in only the "FirstName" and "LastName" columns being created in the dropdown and, for example, "Naomi Robitaille" when the item is selected. The column specified by valueMember will also be created, however it will not visible (ColumnInfo.Visible property set to false) unless it is also part of the displayFormat.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also