Click here to Skip to main content
15,922,650 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How we convert textbox column into combobox column and vise versa dynamically using c#.net
in datagridview.
Posted
Comments
Nooa 25-Nov-13 19:36pm    
1st option:
at first you have to copy the entries of the column
2nd, delete the column
3rd, add the new column as required type
4th, fill the column with the entries

2nd option:
always create and edit 2 colums (one combo, one text) and just switch visibility between both if you need to


ps:
you will get textlines to items with something like this
[code]
foreach(var x in text.replace('\r', string.empty).split('\n'))
combobox.itmes.add(x);
[/code]

and other way around:
[code]
text = string.concat(combobox.items, "\r\n");
[/code]

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