Manaual DataBinging on a DataGridView Column

I have a datagridview that has a comboboxColumn

How do i programatically set the values of the dropdown items to those in a pre loaded datatable?

LVL 1
ict-torquilclarkAsked:
Who is Participating?
 
strickddCommented:
myDDL.DataSource = MyDataTable;
myDDL.DataTextField = "Column1Name";
myDDL.DataValueField = "Column2Name";
myDDL.DataBind();
0
 
strickddCommented:
Bind the selected value to a hidden field. In the OnDataBound event, loop through the rows of the gridview and apply the values. Finally set the selected value based on the hidden field.
0
 
ict-torquilclarkAuthor Commented:
I need to do complex data binding with a Display Member and a value member.

How could i do that?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.