Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In a WinForm application, I've a DataGridView control. I don't add any column to it. I just set its DataSource to a list. The list is of type Field which is a class I wrote. It contains of three members, Name of type string, Type of type string and Len of type int. This causes no problem and the DataGridView fills with the proper content. But now I need the second column (Type) to be shown as a non-editable Combobox instead of a simple string, so that the user may just select from the predefined objects.
How can it be possible?

What I have tried:

I thought the type of the column should be a function of the type of the member. So I changed Type from string to an enumeration. But this didn't help.
Posted

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