Represents a control that allows the user to select a single item from a drop-down list.
For a list of all members of this type, see RelationalDropDownList Members.
System.Object
Control
WebControl
ListControl
DropDownList
RelationalDropDownList
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
The control can be linked to a parent ListControl. This enables the control to show a subset of data based on the selection in the parent ListControl. The relationships between the lists are automatically built based on the DataRelations in the DataSet identified by the control's DataSource property. The control's DataSource must be a DataSet with at least one DataRelation.
The control may be used like any other list control and will in fact, behave like any other list control until the ParentListID property is set. The ParentListID property is the only additional property that needs to be set in order to have a client side updating, relational list control.
The following example demonstrates how to bind data to and select the parent list of the control
<%@ Page language="c#" %>
<%@ Register
TagPrefix="fusion8"
Namespace="Fusion8Design.WebControls.UI"
Assembly="Fusion8Design.WebControls.UI.RelationalListControls" %>
<script runat="server">
protected RelationalDataSet relationalDataSet1;
potected void Page_Load(object sender, System.EventArgs e)
{
if(!Page.IsPostBack)
{
this.relationalDataSet1.ReadXml(Server.MapPath("RelationalDataSet.xml"));
this.ParentList.DataBind();
this.ChildList.DataBind();
}
}
</script>
<html><body><form runat="server">
<fusion8:RelationalDropDownList
id=ParentList
runat="server"
DataValueField="ID"
DataTextField="Name"
DataMember="Parent"
DataSource="<%# relationalDataSet1 %>"
</fusion8:RelationalDropDownList>
<fusion8:RelationalDropDownList
id=ChildList
runat="server"
KeepFirstItem="True"
ParentListID="ParentList">
DataValueField="ID"
DataTextField="Name"
DataMember="Child"
DataSource="<%# relationalDataSet1 %>"
</fusion8:RelationalDropDownList>
</form></body></html>
See the RegisterClientScript method for an example on how to use an external script file.
Namespace: Fusion8Design.WebControls.UI
Assembly: Fusion8Design.WebControls.UI.RelationalListControls (in Fusion8Design.WebControls.UI.RelationalListControls.dll)
RelationalDropDownList Members | Fusion8Design.WebControls.UI Namespace