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
373 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

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

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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

734 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