I have to Listboxes populated by a database. The goal is to copy items from RadListBoxSource to RadListBoxTarget. RadListBoxSource should insert the record via Autopostback into the database. The database is a Oracle 10.
The problem is, that the records in RadListBoxTarget won't be inserted into the database. Deleting from db works fine.
What's wrong with the code? Anyone got an idea?
The problem is, that the records in RadListBoxTarget won't be inserted into the database. Deleting from db works fine.
What's wrong with the code? Anyone got an idea?
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> |
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" /> |
<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1"> |
<telerik:RadListBox ID="RadListBoxSource" runat="server" Width="400px" Height="200px" |
SelectionMode="Multiple" AllowTransfer="true" |
TransferToID="RadListBoxTarget" AutoPostBackOnTransfer="true" |
AllowReorder="false" TransferMode="Copy" |
DataSourceID="SqlDataSourceSource" DataKeyField="ID" |
DataTextField="ID" DataValueField="ID"> |
</telerik:RadListBox> |
<telerik:RadListBox ID="RadListBoxTarget" runat="server" Width="400px" Height="200px" |
SelectionMode="Multiple" AllowDelete="True" DataKeyField="ID" |
DataSourceID="SqlDataSourceTarget" |
DataTextField="ID" DataValueField="ID" |
AutoPostBackOnDelete="true" AutoPostBackOnReorder="true" |
TransferToID="RadListBoxSource"> |
</telerik:RadListBox> |
<asp:SqlDataSource ID="SqlDataSourceSource" runat="server" ConnectionString="<%$ ConnectionStrings:BayerAgrarTVConnectionString %>" |
ProviderName="<%$ ConnectionStrings:BayerAgrarTVConnectionString.ProviderName %>" |
SelectCommand="SELECT ID, HEADLINE FROM AGRARTV2009_MOVIES WHERE (PUBLISH = 1) ORDER BY HEADLINE"> |
</asp:SqlDataSource> |
<asp:SqlDataSource ID="SqlDataSourceTarget" runat="server" ConnectionString="<%$ ConnectionStrings:BayerAgrarTVConnectionString %>" |
ProviderName="<%$ ConnectionStrings:BayerAgrarTVConnectionString.ProviderName %>" |
SelectCommand="SELECT AGRARTV2009_MOVIES_TSR_BOX.ID_MOVIE AS ID, AGRARTV2009_MOVIES.HEADLINE FROM AGRARTV2009_MOVIES_TSR_BOX, AGRARTV2009_MOVIES WHERE AGRARTV2009_MOVIES_TSR_BOX.ID_MOVIE = AGRARTV2009_MOVIES.ID ORDER BY AGRARTV2009_MOVIES.HEADLINE" |
InsertCommand="INSERT INTO AGRARTV2009_MOVIES_TSR_BOX (ID_MOVIE) VALUES (&ID)" |
DeleteCommand="DELETE FROM AGRARTV2009_MOVIES_TSR_BOX WHERE ID_MOVIE = &ID"> |
<DeleteParameters> |
<asp:Parameter Name="ID" Type="Int32" /> |
</DeleteParameters> |
<InsertParameters> |
<asp:ControlParameter Name="ID" Type="Int32" /> |
</InsertParameters> |
</asp:SqlDataSource> |
</telerik:RadAjaxPanel> |