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


Glossary Item Box

Gets or sets the name of the list of data that the data-bound control binds to, in cases where the data source contains more than one distinct list of data items.

Syntax

Visual Basic (Declaration) 
Public Property DataMember As String
Visual Basic (Usage)Copy Code
Dim instance As AjaxComboBoxCellType
Dim value As String
 
instance.DataMember = value
 
value = instance.DataMember
C# 
public string DataMember {get; set;}

Example

This example sets the DataMember property.
C#Copy Code
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;
Visual BasicCopy Code
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 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.