Spread for ASP.NET 7.0 Product Documentation
DataSource Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > MultiColumnComboBoxCellType Class : DataSource Property


Glossary Item Box

Gets or sets the data source for the list portion of the combo box.

Syntax

Visual Basic (Declaration) 
Public Property DataSource As Object
Visual Basic (Usage)Copy Code
Dim instance As MultiColumnComboBoxCellType
Dim value As Object
 
instance.DataSource = value
 
value = instance.DataSource
C# 
public object DataSource {get; set;}

Example

This example sets the DataSource property.
C#Copy Code
System.Data.DataSet ds = new System.Data.DataSet();
System.Data.DataTable emp = new System.Data.DataTable("Employees");
System.Data.DataTable div = new System.Data.DataTable("Division");
emp.Columns.Add("LastName");
emp.Columns.Add("FirstName");
emp.Rows.Add(new Object[] { "Jones", "Marianne" });
emp.Rows.Add(new Object[] { "Fieldes", "Anna" });
div.Columns.Add("Section");
div.Columns.Add("Specialty");
div.Rows.Add(new Object[] { "Finance", "Taxes" });
div.Rows.Add(new Object[] { "Mergers", "Legal" });
ds.Tables.AddRange(new System.Data.DataTable[] { emp, div });
FarPoint.Web.Spread.MultiColumnComboBoxCellType mccbct = new FarPoint.Web.Spread.MultiColumnComboBoxCellType();
mccbct.DataSource = ds;
mccbct.VerticalAlign = VerticalAlign.Top;
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = mccbct;
VB.NETCopy Code
Dim ds As New DataSet()
Dim emp As New DataTable("Employees")
Dim div As New DataTable("Division")
emp.Columns.Add("LastName")
emp.Columns.Add("FirstName")
emp.Rows.Add(New Object() {"Jones", "Marianne"})
emp.Rows.Add(New Object() {"Fieldes", "Anna"})
div.Columns.Add("Section")
div.Columns.Add("Specialty")
div.Rows.Add(New Object() {"Finance", "Taxes"})
div.Rows.Add(New Object() {"Mergers", "Legal"})
ds.Tables.AddRange(New DataTable() {emp, div})
Dim mccbct As New FarPoint.Web.Spread.MultiColumnComboBoxCellType
mccbct.DataSource = ds
mccbct.VerticalAlign = VerticalAlign.Top
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = mccbct

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.