I have a 2 list boxes on a page the master list box is loaded from code behind. I have a second list box on the page which I want populated dynamically. I have a sqldatasource which calls an parameterized sql strored procedure to load the data. The control parameter is tied to a text box on the page. Each time a item or series of items are selected from my first radio list, it populates the textbox with the item values and that in turn should call the sproc with the values as a parameter to load into the second list box. It works in theory J, but I’m having a problem loading my second list box. I really don’t want to have the form post back, because it’s not very optimized even with the ajax controls that can give the same effect as it not posting back. Any help would be greatly appreciated.
Below is an example of the scenario that I have.
<telerik:RadTextBox ID="txtMerch" runat="server" Visible="true"> </telerik:RadTextBox>
<telerik:RadListBox ID="RadListBox1" runat="server" Height="200px" Skin="Forest" CheckBoxes="true" Width="200px" AutoPostBack="false" OnClientItemChecked="onItemChecked" OnClientItemChecking="onItemChecking" >
</telerik:RadListBox>
<telerik:RadListBox ID="RadListBox2" runat="server" DataSourceID="SqlDataSource2"
DataKeyField="mykey" DataTextField="Locations" Height="200px" Skin="Forest" AllowAutomaticUpdates="true" AutoPostBack="false"
CheckBoxes="true" Width="200px">
</telerik:RadListBox>
<asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:MyConnectstring %>"
runat="server"
SelectCommand= "[dbo].[RptMgr_GetLocations]"
ProviderName="<%$ ConnectionStrings:MyConnectstring.ProviderName %>"
SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
<SelectParameters>
<asp:ControlParameter ControlID="txtMerch" Name="merch"
PropertyName="Text" Type="String" />
<asp:Parameter Direction="ReturnValue" Name="RETURN_VALUE" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>