Solved

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

Posted on 2013-01-30
3
897 Views
Last Modified: 2013-02-07
How to remove item from Bind listBox control with sql data in vb.net windows Application?
0
Comment
Question by:mohgt
  • 2
3 Comments
 
LVL 42

Assisted Solution

by:sedgwick
sedgwick earned 167 total points
ID: 38834778
what item?
can u post some code?

try this:

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

Open in new window

0
 
LVL 35

Assisted Solution

by:YZlat
YZlat earned 333 total points
ID: 38836497
you could filter your SqlDataSource and the refresh listbox
0
 
LVL 35

Accepted Solution

by:
YZlat earned 333 total points
ID: 38836510
if you are not using SqlDataSource to bind your listbox, then something like

ListBox1.Items.Remove(ListBox1.SelectedItem)

will suffice
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now