Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

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

Assisted Solution

by:Meir Rivkin
Meir Rivkin earned 501 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

1
 
LVL 35

Assisted Solution

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

Accepted Solution

by:
YZlat earned 999 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

885 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