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
368 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tabcontrol Caption? 1 30
Setting runtime form location 4 30
Closing all open child forms. 4 38
How to use odbc in vb to connect to ms sql 14 38
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

13 Experts available now in Live!

Get 1:1 Help Now