Click here to Skip to main content
15,893,337 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have take one datagridview.
Add one comboboxcolumn name as month and one normal column name as days

I had use code

datagridview1.rows.add(new object() {" ","31"})

When run the project the combobox column is show blank
but when i do dropdown then show all month

i want a add value in the combobox column

How do that?
Posted
Updated 3-May-11 3:32am
v2
Comments
Hemant__Sharma 3-May-11 9:38am    
Can you provide more code you've written in the .aspx /winform ?

1 solution

You must add some sort of datasource to the datagridview. Then add the month to a record of this datasource.

for example:

create a bindingList which contains an array of objects. These objects represent the months you want to display.
When you add a new object to this bindingList, the properties of this new object will be shown in the columns of the datagridview.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900