Hello
- I have two RadListBoxes linked to two different ObjectDataSource objects RadListBox1 and RadListBox2. (Markup below)
- My project uses an SQL Server 2005 database using SQL to Linq.
- When I attempt to Transfer items from RadListBox1 to RadListBox2 I receive a javascript error: "Error: Sys.WebForms.PageRequestManagerServerErrorException: Object of type 'System.Int32' cannot be converted to type 'System.String'."
- When I clcik the trasnfer button, the "Deleted" event is fired for the first list box, but for some reason the Insert event for the second listbox is not being triggered.
List Box Markup:
<td> |
<h2>Available Features</h2> |
<telerik:RadListBox ID="RadListBox1" |
runat="server" |
AllowTransfer="True" |
DataKeyField="FeatureId" |
DataSortField="FeatureId" |
DataSourceID="FeatureDS" |
DataTextField="FeatureDescription" |
DataValueField="FeatureId" |
TransferToID="RadListBox2" |
AllowAutomaticUpdates="True" |
AutoPostBackOnTransfer="True" |
EmptyMessage="There are no available features." |
Skin="Office2007" |
Width="250px"> |
<ButtonSettings ShowTransferAll="False" /> |
<EmptyMessageTemplate> |
There are no available features. |
</EmptyMessageTemplate> |
</telerik:RadListBox> |
</td> |
<td> |
<h2>Competitor Features</h2> |
<telerik:RadListBox |
runat="server" |
ID="RadListBox2" |
DataKeyField="FeatureId" |
DataSortField="FeatureDescription" |
DataSourceID="CompetitorFeatureDS" |
DataTextField="FeatureDescription" |
AllowAutomaticUpdates="True" |
EmptyMessage="This competitor has no features assigned." |
Skin="Office2007" |
Width="250px"> |
<ButtonSettings ShowTransferAll="False" /> |
<EmptyMessageTemplate> |
This competitor has no features assigned. |
</EmptyMessageTemplate> |
</telerik:RadListBox> |
</td> |
DataSources:
<%--**************************************************--%> |
<%--DATA SOURCES--%> |
<%--**************************************************--%> |
<pp:ObjectContainerDataSource ID="CompetitorDS" |
DataObjectTypeName="MagicMindsCRM.Modules.Competitors.BusinessEntities.Competitor" |
OnUpdated="CompetitorDS_Updated" |
runat="server" /> |
<pp:ObjectContainerDataSource ID="CompetitorFeatureDS" |
DataObjectTypeName="MagicMindsCRM.Modules.Competitors.BusinessEntities.CompetitorFeature" |
OnDeleted="CompetitorFeatureDS_Deleted" |
OnInserted="CompetitorFeatureDS_Inserted" |
runat="server" /> |
<pp:ObjectContainerDataSource ID="FeatureDS" DataObjectTypeName="MagicMindsCRM.Modules.Competitors.BusinessEntities.Feature" runat="server" |
OnDeleted="FeatureDS_Deleted" |
OnInserted="FeatureDS_Inserted" /> |
<pp:ObjectContainerDataSource ID="CompetitorStatusDS" DataObjectTypeName="MagicMindsCRM.Modules.Competitors.BusinessEntities.CompetitorStatus" runat="server" /> |
Screenshot attached.
Many thanks for your help.