I would recommend using the DataGridViewCom boBoxColumn class. Here is
the link to the documentation:
http://msdn2.microsoft.com/en-us/lib...boxcolumn.aspx
To elaborate on the list of steps in order to use the class:
Create a DataGridView.
Set the DataSource property of the DataGridView.
- This is the source of the data on the grid view.
Create a DataGridViewCom boBoxColumn.
If the data source contains multiple properties or columns, set the
DataPropertyNam e property to the name of the property or column for
populating the cell values.
Use the DataSource or Items properties to establish the selections.
- This is the source of the list data (from which your values come from)
on the DataGriViewComb oBoxColumn.
Use the ValueMember and DisplayMember properties to establish a mapping
between cell values and what will be displayed on the screen.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard. caspershouse.co m
"DBC User" <db*****@gmail. com> wrote in message
news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
Hi All,
I am using a database which doesn't suppport and since I am using ORM I
can not use join query to create table object mapping. So my question
is
I have a master table which has bunch of columns I want to display. Of
those 3 of them are integer columns, which needed to be translated into
string by looking up on a reference table. How can I translate the
integer values to string after the table is fetched and put in the
datagridview?? I can read the reference table and put it in memory for
look up but I couldn't translate the columns in the datagridview to
string.. Any help please??
Thanks.