Click here to Skip to main content
15,914,074 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to create custom coloumn for datagridview like combobox but its show gridview instead of list and when we select any row then set the text first coloumn value of row in combobox text.
please help me.

[From WW]
wow...that's difficult to read. Let me see if I can't rephrase.

You want to create a custom column for the DataGridView. You want that column, when clicked, to have a dropdown that shows a GridView instead of a list.

Of course this: "and when we select any row then set the text first coloumn value of row in combobox text.", I have no idea what you're trying to say.
Posted
Updated 2-Jun-10 6:14am
v2
Comments
Sandeep Mewara 2-Jun-10 1:55am    
Your question is not quite clear. Please be a little brief.

Hi,

You can use "DataGridViewComboBoxColumn" class to achieve this. Please follow the following link for more reference and example code,

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn.aspx[^]
 
Share this answer
 
v3
Comments
William Winner 2-Jun-10 12:18pm    
I won't downvote because his question wasn't clear, but it looks to me like he wants to have a custom dropdown that instead of displaying a list like the combobox does, it displays a GridView. So, it's going to take a custom column, not a standard comboBoxColumn.

Of course, with the way the question was written, he could actually want code to land a man on the moon.
If you want to create a custom column type for a datagridview, there are a lot of articles out there.

See here: google search[^]

It's not something that we can answer in a quick question though. You'll need to do some reading.
 
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