I have a form that has 2 rad comboboxes each bound to its own datasource control.
The second RadCombo's datasource's select parameter takes its value from the SelectdValue of the first RadCombo and then is suposed to supply a new list of items to the second RadCombo.
The second RadCombo also has 1 Static Item and has the AppendDataBoundItems set to "true"
The problem is when I change the selectedInmdex of the first RadCombo and the second RadCombo gets databound, it then Adds the new Items to the second RadCombo instead of replacing them
So as a user clicks and clicks at the different items of the first RadCombo, the list item of the secon Radcombo keep on growing and the items even get duplicated if the same listitem on the first RadCombo gets clicked more than once.
It needs to first clear the list of items before it rebind to the new data.
How do I do this?
The second RadCombo's datasource's select parameter takes its value from the SelectdValue of the first RadCombo and then is suposed to supply a new list of items to the second RadCombo.
The second RadCombo also has 1 Static Item and has the AppendDataBoundItems set to "true"
The problem is when I change the selectedInmdex of the first RadCombo and the second RadCombo gets databound, it then Adds the new Items to the second RadCombo instead of replacing them
So as a user clicks and clicks at the different items of the first RadCombo, the list item of the secon Radcombo keep on growing and the items even get duplicated if the same listitem on the first RadCombo gets clicked more than once.
It needs to first clear the list of items before it rebind to the new data.
How do I do this?
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server"
SelectMethod="GetAdSubCats" TypeName="MB.TheBeerHouse.BLL.Ads.AdSubCat">
<SelectParameters>
<asp:ControlParameter ControlID="CatSelect" Name="AdCatID" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
<
telerik:RadComboBox ID="SubcatSelect" runat="server"
DataSourceID="ObjectDataSource2" DataTextField="Title" DataValueField="ID"
AppendDataBoundItems="True" AutoPostBack="True" Skin="Hay">
<Items>
<telerik:RadComboBoxItem Text="Select an Ad Heading" Value="0" />
</Items>
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>