?
Solved

vb.net winforms listbox bound

Posted on 2005-04-20
2
Medium Priority
?
503 Views
Last Modified: 2008-02-01
hi,

How do I get selectedText + selectedvalue from a windows form bound  dataset listbox (Single selection listbox)

                 Listbox.ValueMember = "Customer_ID"
                  Listbox.DisplayMember = "Customer_Name"
                  Listbox.DataSource = ds.tables(0).defaultView

 when value selected I Need to get customerID and customer_Name

 

0
Comment
Question by:sainavya1215
  • 2
2 Comments
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 600 total points
ID: 13822958
DirectCast(ListBox1.SelectedItem, DataRowView).Item("Customer_name")
ListBox1.SelectedValue.ToString
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 13822973
although you can omit the tostring :-)

ListBox1.SelectedValue
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

809 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