Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread.CellType Namespace / MultiColumnComboBoxCellType Class / DataMemberList Property
Example


In This Topic
    DataMemberList Property
    In This Topic
    Gets or sets the name of the data member that populates the list in the list portion of the combo box.
    Syntax
    'Declaration
     
    Public Property DataMemberList As String
    'Usage
     
    Dim instance As MultiColumnComboBoxCellType
    Dim value As String
     
    instance.DataMemberList = value
     
    value = instance.DataMemberList
    public string DataMemberList {get; set;}

    Property Value

    String containing the list of data members
    Example
    This example creates a multiple column combo box cell, sets the data source and member list, and assigns this cell type to a cell.
    string conStr = "Provider=Microsoft.JET.OLEDB.4.0;data source= D:\\Patients2000.mdb"; 
    string sqlStr = "SELECT * FROM Patients"; 
    System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(conStr); 
    DataSet ds = new DataSet(); 
    System.Data.OleDb.OleDbDataAdapter da = new System.Data.OleDb.OleDbDataAdapter(sqlStr, conn); 
    da.Fill(ds); 
    FarPoint.Win.Spread.CellType.MultiColumnComboBoxCellType mc = new FarPoint.Win.Spread.CellType.MultiColumnComboBoxCellType();
    
    mc.DataSourceList = ds; 
    mc.DataMemberList = "Patients"; 
    fpSpread1.ActiveSheet.Cells[0, 0].CellType = mc;
     
    Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source= D:\Patients2000.mdb"
    Dim sqlStr As String = "SELECT * FROM Patients"
    Dim conn As New System.Data.OleDb.OleDbConnection(conStr)
    Dim ds As DataSet = New DataSet()
    Dim da As New System.Data.OleDb.OleDbDataAdapter(sqlStr, conn)
    da.Fill(ds)
    
    Dim mc As New FarPoint.Win.Spread.CellType.MultiColumnComboBoxCellType
    mc.DataSourceList = ds
    mc.DataMemberList = "Patients"
    
    FpSpread1.ActiveSheet.Cells(0, 0).CellType = mc
    See Also