Spread for ASP.NET 9.0 Product Documentation
DataSource Property (AjaxComboBoxCellType)
Example 


Gets or sets the object from which the data-bound control retrieves its list of data items.
Syntax
'Declaration
 
Public Property DataSource As Object
'Usage
 
Dim instance As AjaxComboBoxCellType
Dim value As Object
 
instance.DataSource = value
 
value = instance.DataSource
public object DataSource {get; set;}
Example
This example sets the DataSource property.
System.Data.DataSet data = new System.Data.DataSet("data");
data.Tables.Add("Table1");
data.Tables["table1"].Columns.Add("dataText");
data.Tables["table1"].Columns.Add("dataValue");
data.Tables["table1"].Rows.Add("WinSpread", "1");
data.Tables["table1"].Rows.Add("WebSpread", "2");
data.AcceptChanges();

FarPoint.Web.Spread.Extender.AjaxComboBoxCellType combo = new FarPoint.Web.Spread.Extender.AjaxComboBoxCellType();
combo.ShowEditor = true;
combo.DataSource = data;
combo.DataMember = "table1";
combo.DataTextField = "dataText";
combo.DataValueField = "dataValue";
FpSpread1.Sheets[0].Cells[0, 0].CellType = combo;
Dim data As New System.Data.DataSet("data")
data.Tables.Add("Table1")
data.Tables("table1").Columns.Add("dataText")
data.Tables("table1").Columns.Add("dataValue")
data.Tables("table1").Rows.Add("WinSpread", "1")
data.Tables("table1").Rows.Add("WebSpread", "2")
data.AcceptChanges()

Dim combo As New FarPoint.Web.Spread.Extender.AjaxComboBoxCellType()
combo.ShowEditor = True
combo.DataSource = data
combo.DataMember = "table1"
combo.DataTextField = "dataText"
combo.DataValueField = "dataValue"
FpSpread1.Sheets(0).Cells(0, 0).CellType = combo
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

AjaxComboBoxCellType Class
AjaxComboBoxCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.