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






Gets or sets the ID of the control from which the WebCombo control retrieves its list of data items.Gets or sets the ID of the control from which the WebCombo control retrieves its list of data items.

Syntax

Visual Basic (Declaration) 
<DefaultValueAttribute()>
<NotifyParentPropertyAttribute(True)>
<CategoryAttribute("Data")>
<IDReferencePropertyAttribute(System.Web.UI.DataSourceControl)>
<DescriptionAttribute("Gets or sets the ID of the control from which the WebCombo control retrieves its list of data items.")>
<ISNet.Serialization.BinarySerializableAttribute()>
Public Property DataSourceID As String
Visual Basic (Usage)Copy Code
Dim instance As WebCombo
Dim value As String
 
instance.DataSourceID = value
 
value = instance.DataSourceID
C# 
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
[CategoryAttribute("Data")]
[IDReferencePropertyAttribute(System.Web.UI.DataSourceControl)]
[DescriptionAttribute("Gets or sets the ID of the control from which the WebCombo control retrieves its list of data items.")]
[ISNet.Serialization.BinarySerializableAttribute()]
public string DataSourceID {get; set;}
Delphi 
public read-write property DataSourceID: String; 
JScript 
DefaultValueAttribute()
NotifyParentPropertyAttribute()
CategoryAttribute("Data")
IDReferencePropertyAttribute(System.Web.UI.DataSourceControl)
DescriptionAttribute("Gets or sets the ID of the control from which the WebCombo control retrieves its list of data items.")
ISNet.Serialization.BinarySerializableAttribute()
public function get,set DataSourceID : String
Managed Extensions for C++ 
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
[CategoryAttribute("Data")]
[IDReferencePropertyAttribute(System.Web.UI.DataSourceControl)]
[DescriptionAttribute("Gets or sets the ID of the control from which the WebCombo control retrieves its list of data items.")]
[ISNet.Serialization.BinarySerializableAttribute()]
public: __property string* get_DataSourceID();
public: __property void set_DataSourceID( 
   string* value
);
C++/CLI 
[DefaultValueAttribute()]
[NotifyParentPropertyAttribute(true)]
[CategoryAttribute("Data")]
[IDReferencePropertyAttribute(System.Web.UI.DataSourceControl)]
[DescriptionAttribute("Gets or sets the ID of the control from which the WebCombo control retrieves its list of data items.")]
[ISNet.Serialization.BinarySerializableAttribute()]
public:
property String^ DataSourceID {
   String^ get();
   void set (    String^ value);
}

Example

 

Remarks

WebCombo.NET 4.0 allows you to perform codeless databinding which you can configure the datasource, its connection and its related property without writing codes. The WebCombo will bound to a datasource control through DataSourceID property. The WebCombo connects to the specified datasource control and display data from the datasource available in SqlDataSource (Please look at the statement below).

<ISWebCombo:WebCombo ID="WebCombo1" runat="server"
UseDefaultStyle="True" Width="200px" Height="20px"
DataSourceID="SqlDataSource1" DataTextField
="ActivityName"
DataValueField="ActivitiesId">
</ISWebCombo:WebCombo>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:DbConnectionString %>"
SelectCommand="SELECT * FROM [Activities]">
</asp:SqlDataSource>

Unlike in the previous versions, InitializeDataSource event is no longer fired when the WebCombo is bound to DataSourceID. This event will still be fired normally when the DataSourceID property is empty (old databinding mode).

To learn more about how to bind WebCombo to AccessDataSourceControl, please read Walkthrough: Binding WebCombo to AccessDataSource control.

WebCombo.NET v4.0 still support older databinding mechanism through InitializeDataSource or DataSource property set in code behind.

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

Reference

WebCombo Class
WebCombo Members

Tasks

Walkthrough: Binding WebCombo to AccessDataSource control

Concepts

No-codes data binding through DataSourceControl support

© 2012 Intersoft Solutions Corp. All Rights Reserved.