Once I drag an item from one RadListBox to the TransferTo RadListBox, I want the item I just moved defaulted to selected in the TransferTo RadListBox. So when I drage a group from AllGroupsRadListBox into SharedGroupsRadListBox, I want the SharedGroupsRadListBox copy of the group to be selected so that the user can then do what he/she needs to do with the Group they just copied without having to then click on it again (my users are very click averse and quite vocal about it).<
telerik:RadListBox
runat
=
"server"
ID
=
"AllGroupsRadListBox"
Height
=
"200px"
Width
=
"200px"
AllowTransfer
=
"true"
SelectionMode
=
"Single"
TransferToID
=
"SharedGroupsRadListBox"
EnableDragAndDrop
=
"true"
OnClientSelectedIndexChanged
=
"AllGroupsRadListBox_SelectedIndexChanged"
/>
<
telerik:RadListBox
runat
=
"server"
ID
=
"SharedGroupsRadListBox"
Height
=
"200px"
Width
=
"200px"
/><
br
/>
Users in selected group:<
br
/>
<
telerik:RadListBox
runat
=
"server"
ID
=
"UsersRadListBox"
Height
=
"200px"
Width
=
"200px"
/>
private void FillAllGroups()
{
BWGroups allGroups = new BWGroups();
allGroups.GetAllBWGroups();
AllGroupsRadListBox.DataTextField = "BWGroupName";
AllGroupsRadListBox.DataValueField = "BWGroupID";
AllGroupsRadListBox.DataSource = allGroups.BWGroupList;
AllGroupsRadListBox.DataBind();
}
protected void AllGroupsRadListBox_SelectedIndexChanged(object sender, EventArgs e)
{
int parseGroupId = -1; Int32.TryParse(AllGroupsRadListBox.SelectedValue.ToString(), out parseGroupId);
BWUsers usersInGroup = new BWUsers();
if(parseGroupId > 0)
usersInGroup.GetActiveBWUsersByGroupID(parseGroupId);
UsersRadListBox.DataTextField = "BWGroupName";
UsersRadListBox.DataValueField = "BWGroupID";
UsersRadListBox.DataSource = usersInGroup.BWUserList;
UsersRadListBox.DataBind();
}