I have 2 combo boxes on my page. when I change the first one, it loads the 2nd combo data (using a template). However, the SELECTED item displayed in the combo box does not change.
I simply want the first item in the list to be displayed.
telerik:RadComboBox ID="cmbCarrier" runat="server" DataSourceID="sqlCarrier" |
DataTextField="Name" DataValueField="CARRIER_ID" AutoPostBack="True" Width="388px" CausesValidation="False"> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
</telerik:RadComboBox> |
Select Contract: |
<telerik:RadComboBox ID="cmbContract" runat="server" DataSourceID="sqlContracts" MarkFirstMatch="true" OnDataBound="cmbContract_DataBound" EnableLoadOnDemand="true" HighlightTemplatedItems="true" Width="420px" OnItemDataBound="cmbContract_ItemDataBound" OnSelectedIndexChanged="cmbContract_SelectedIndexChanged" CausesValidation="False" > |
<HeaderTemplate> |
<table style="width: 100%; text-align: left"> |
<tr> |
<td style="width: 125px;"> |
Contract ID |
</td> |
<td style="width: 125px;"> |
Carrier |
</td> |
<td style="width: 125px;"> |
Description |
</td> |
</tr> |
</table> |
</HeaderTemplate> |
<ItemTemplate> |
<table style="width: 100%; text-align: left"> |
<tr> |
<td style="width: 125px;"> |
<%# DataBinder.Eval(Container.DataItem, "CONTRACT_ID") %> |
</td> |
<td style="width: 125px;"> |
<%# DataBinder.Eval(Container.DataItem, "Name") %> |
</td> |
<td style="width: 125px;"> |
<%# DataBinder.Eval(Container.DataItem, "DESCRIPTION") %> |
</td> |
</tr> |
</table> |
</ItemTemplate> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
</telerik:RadComboBox> |
protected void cmbContract_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e) |
{ |
{ |
e.Item.Text = ((DataRowView)e.Item.DataItem)["CONTRACT_ID"].ToString() + "; " + ((DataRowView)e.Item.DataItem)["Name"].ToString() + "; " + ((DataRowView)e.Item.DataItem)["DESCRIPTION"].ToString(); |
e.Item.Value = ((DataRowView)e.Item.DataItem)["CONTRACT_ID"].ToString() + "; " + ((DataRowView)e.Item.DataItem)["Name"].ToString() + "; " + ((DataRowView)e.Item.DataItem)["DESCRIPTION"].ToString(); |
} |
} |
I simply want the first item in the list to be displayed.