We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.
So far everything is working fine and I have the two listboxes to play around with and can move stuff back and forth once the listboxes have been bound to a null. My issue is trying to move the data in the datatables back and forth (which is why I set up two datatables and bound the listboxes in the first place). Could someone please explain and possibly provide an example of how I could find the associated row in dt and move it to cdt if that corresponding row in listbox1 is selected? Ideally I want to be able to handle multiple selected values in Listbox1 use 'For Each item As ListItem In ListBox1.Items...Next' to handle this. Thanks a ton!
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'Label1.Text = ADS1.ConnectionString If Not Page.IsPostBack Then ListLoad() End If End Sub Private Sub ListLoad() Dim dv As System.Data.DataView = CType(ADS1.Select(DataSourceSelectArguments.Empty), System.Data.DataView) dt = dv.ToTable cdt = dt.Clone ListBox1.DataSource = dt ListBox1.DataValueField = "ID" ListBox1.DataTextField = "FullName" ListBox1.DataBind() ListBox2.DataSource = cdt ListBox2.DataValueField = "ID" ListBox2.DataTextField = "FullName" ListBox2.DataBind() End Sub