• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 936
  • Last Modified:

remove item from Bind listBox control with sql data in vb.net windows Application

How to remove item from Bind listBox control with sql data in vb.net windows Application?
1
mohgt
Asked:
mohgt
  • 2
3 Solutions
 
Meir RivkinFull stack Software EngineerCommented:
what item?
can u post some code?

try this:

dt.Rows.Remove((listBox.SelectedItem as DataRowView).Row)

Open in new window

1
 
YZlatCommented:
you could filter your SqlDataSource and the refresh listbox
0
 
YZlatCommented:
if you are not using SqlDataSource to bind your listbox, then something like

ListBox1.Items.Remove(ListBox1.SelectedItem)

will suffice
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now