Solved

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

Posted on 2013-01-30
3
899 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

831 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