Intersoft WebCombo Documentation
DataTextField Property
See Also  Example Send Feedback
ISNet.WebUI.WebCombo Namespace > WebCombo Class : DataTextField Property






Returns or sets the data field used to display the text in WebCombo control. Returns or sets the data field used to display the text in WebCombo control.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Data")>
<DescriptionAttribute("Returns or sets the data field used to display the text in WebCombo control.")>
<DefaultValueAttribute()>
<NotifyParentPropertyAttribute(True)>
<ISNet.Serialization.XmlSerializableAttribute()>
<ISNet.Serialization.BinarySerializableAttribute()>
Public Property DataTextField As String
Visual Basic (Usage)Copy Code
Dim instance As WebCombo
Dim value As String
 
instance.DataTextField = value
 
value = instance.DataTextField
C# 
[CategoryAttribute("Data")]
[DescriptionAttribute("Returns or sets the data field used to display the text in WebCombo control.")]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
public string DataTextField {get; set;}
Delphi 
public read-write property DataTextField: String; 
JScript 
CategoryAttribute("Data")
DescriptionAttribute("Returns or sets the data field used to display the text in WebCombo control.")
DefaultValueAttribute()
NotifyParentPropertyAttribute()
ISNet.Serialization.XmlSerializableAttribute()
ISNet.Serialization.BinarySerializableAttribute()
public function get,set DataTextField : String
Managed Extensions for C++ 
[CategoryAttribute("Data")]
[DescriptionAttribute("Returns or sets the data field used to display the text in WebCombo control.")]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
public: __property string* get_DataTextField();
public: __property void set_DataTextField( 
   string* value
);
C++/CLI 
[CategoryAttribute("Data")]
[DescriptionAttribute("Returns or sets the data field used to display the text in WebCombo control.")]
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
[ISNet.Serialization.XmlSerializableAttribute()]
[ISNet.Serialization.BinarySerializableAttribute()]
public:
property String^ DataTextField {
   String^ get();
   void set (    String^ value);
}

Example

The following example shows you how to bind data source to a WebCombo (using old databinding mode) and configure the DataTextField programmatically.
C#Copy Code
private void WebCombo1_InitializeDataSource(object sender, ISNet.WebUI.WebCombo.DataSourceEventArgs e)
{
    DataSet ds = new DataSet();
    oleDbDataAdapter1.Fill(ds,"Customers");
    e.DataSource =  ds;
    WebCombo1.DataTextField = "ContactName";
    WebCombo1.DataValueField = "CustomerID";
}

Remarks

DataTextField is a required property in WebCombo control. The control will use the field specified in this property to display the text in WebCombo.

DataTextField can be configured in WebCombo Designer. Alternatively, you can configure it programmatically under InitializeDataSource or InitializeLayout (please look at example above). 

DataTextField is a required property in WebCombo control. The control will use the field specified in this property to display the text in WebCombo.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 Intersoft Solutions Corp. All Rights Reserved.