Hi
You can use from bellow code:
1) Add selected Item from SourceListBox to TargetListBox
private void AddButton_Click(object sender, EventArgs e)
{
this.SourceListBox .Items.Add(this.TargetListBox.SelectedItem);
}
2) Remove selected Item from ListBox:
private void RemoveButton_Click(object sender, EventArgs e)
{
if (this.ListBox.SelectedItem == null)
return;
this.ListBox.Items.Remove(this.ListBox.SelectedItem);
}
3) Delete All items of ListBox:
private void RemoveAllButton_Click(object sender, EventArgs e)
{
this.ListBox.Items.Clear();
}
4) for getting data from Database you can attend to my answer to similar question in bellow link:
Connectivity of only column from database[
^]
I hope it's helpful.
..If it's helpful for you please accept it and give Up vote..