Solved

how do I get a listbox to show up in one column of a datagridview control in vb.net

Posted on 2013-02-03
6
367 Views
Last Modified: 2013-02-04
every thing I read, it says to go to the datagridview properties
listbox details and add a listbox

I can find no such property.

using visual studio 2010.
made all of the columns, want the second column to have a dropdown list with three words in it.
do I have to add something to the project or to the properties or make my own datagrid with this type of property?
thanks gary
0
Comment
Question by:javagair
  • 4
  • 2
6 Comments
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 38849436
There is no ListBox In datagridview ..You can Add a ComboBox Column instead..and change ComboBox Dipslay style...
0
 
LVL 18

Accepted Solution

by:
John (Yiannis) Toutountzoglou earned 500 total points
ID: 38849441
In the DatagridView Tasks select your ComboBox Column in the Data Section You Will see "Items" ..There you can add Line by line whatever you want....

BTW how you populate your dategridview....Did you create it Dynamically or Draged to the form from a dataset?
0
 

Author Comment

by:javagair
ID: 38849903
actually it is blank.  the datagrid will fill in with a row for everyday of the current month. if then if there are no matching dates from a sql search of the database the user can fill in information for each day.  If there are already days filled in for the month they will then populate the datagrid and the user will fill in any missing day's information.

Funny things is that when I looked on multiple programing sites they all mention using the list box, some even have pictures of using it but they all claim there is a listbox bind in the property box.

will try the item list.

gary
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 38850018
Here is a sample
http://www.codeproject.com/Articles/24180/DataGridView-Control-with-ListBox

Also could you give an example for that you say
"looked on multiple programing sites they all mention using the list box.....
maybe these are 'third Party components..
0
 

Author Comment

by:javagair
ID: 38850362
You are right, places I was looking showed picture from the above codeproject and I just made an assumption that I was doing something wrong.

Your solution works great, I just had never used the control before and didn't drop the listbox down for the column.

thanks

gary
0
 
LVL 18

Expert Comment

by:John (Yiannis) Toutountzoglou
ID: 38850719
Glad i Helped you ..


John
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

744 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

10 Experts available now in Live!

Get 1:1 Help Now