I am using the dual list with databound values . The left side is values to add or remove the right side is the table listing of added or removed items. I pass the selected items moved or removed in the right listing as a string into a stored procedure.
However I was hoping to see previously selected items in the form whenever it is opened. It just shows items on left only.
Can I use a select command and link it to the second list box to display items already added to the table?
<Variable Name="FK_J" Value='[[url:ID1]]' DataType="Int32" />
<Variable Name="CREATEDBYID" Value='[[User:ID]]' DataType="Int32" />
<SubmitCommand CommandText="exec sp_jobtrain @FK_J, 0, @FK_T, @CREATEBYID, getdate() " />
<ControlDataSource Id="TR" CommandText="SELECT [ID], [NAME] FROM [TBL_TRAIN] ORDER BY [NAME] ASC"></ControlDataSource>
<table>
<tr>
<td>
<Label For="TRS" Text="T" />
<DualList Id="TRS" DataSourceId="TR" DataTextField="Name" DataValueField="Id" DataField="FK_T" DataType="string" AppendDataBoundItems="True" ListStyle-Width="500" ListStyle-height="600" >
<ListItem Value="-1">(None Selected)</ListItem>
</DualList>
</td>
</tr>
<tr>
<td colspan="2">
<AddButton Text="Add"/> <CancelButton Text="Cancel"/>
</td>
</tr>
</table>