Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am using a DataGridView which has 5 rows and 2 columns.
This is meant to be used for user input.

column 0 is of TextBox
column 1 is of Combobox/TextBox/DateTime control.

The each five row means 5 different type of values like,
row 0 of column 0 is "Enter Gender"
row 1 of column 0 is "Enter Nationality"
row 2 of column 0 is "Enter Date"

and each row of column 1 is to be the respective type of control and accept the values too.

How can i achieve this?
Thanks in advance
Jim
Posted
Comments
joshrduncan2012 18-Oct-13 14:18pm    
What have you tried so far to accomplish this?

1 solution

No way you can't do it. Cells in same column must be same type. I mean you cannot use DataGridViewComboBoxColumn, DataGridViewTextBoxColumn classes for this situation.

You can use an extended listview for this. By using this logic you can extend datagridview too.

In-place editing of ListView subitems[^]
 
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