Hello everyone!
I have 2 listboxes where I am transferring data from one to another. You may check the attached screenshot for a better understanding of my page's layout.
The page contains a combobox and 2 listboxes.The combobox allows you to select a user from the list and then both listboxes will display the permissions this user has (on the left) and the perms he doesn't have (on the right). All of it is automatic of course and connected to a database.
Moving items from one listbox to another is messing with the order. I have tried to do the following:
Protected Sub RadListBoxSource_MM_Transferred(sender As Object, e As RadListBoxTransferredEventArgs) Handles RadListBoxSource_MM.Transferred
SortRadListBoxes_MM
End Sub
Protected Sub RadListBoxDestination_MM_Transferred(sender As Object, e As RadListBoxTransferredEventArgs) Handles RadListBoxDestination_MM.Transferred
SortRadListBoxes_MM()
End Sub
Private Sub SortRadListBoxes_MM()
RadListBoxSource_MM.Sort = RadListBoxSort.Ascending
RadListBoxSource_MM.SortItems()
RadListBoxDestination_MM.Sort = RadListBoxSort.Ascending
RadListBoxDestination_MM.SortItems()
End Sub
This is not working, and the items are being added to the bottom of the list instead of being sorted to their correct position.
Thanks!
<telerik:RadListBox RenderMode="Lightweight" runat="server" ID="RadListBoxSource_MM"
Height="200px" Width="100%" Skin="Material"
AllowTransfer="true" TransferToID="RadListBoxDestination_MM"
ButtonSettings-AreaWidth="35px">
</telerik:RadListBox>
<telerik:RadListBox RenderMode="Lightweight" runat="server"
ID="RadListBoxDestination_MM" Height="200px" Width="100%"
ButtonSettings-AreaWidth="35px" Skin="Material">
</telerik:RadListBox>