Using a control template in datagrid
<asp:templatecolumn headertext="columnheader">
<ItemTemplate>
<asp:label id="LabelName" runat="server" Text='<%# Container.dataitem("tempfield") %>'>
</asp>
</ItemTemplate>
<EditItemTemplate>
<asp:dropdownlist id="ddl1" runat="server" datavaluefield="Datavalue" datatextfield="DataDisplay" datasource="sqldatasource" >
</asp:dropdownlist>
</EditItemTemplate>
</asp:TemplateColumn>
the codebehind will look like this wherever you decide to put the code:
'declare variables to hold data
dim templist as DropDownList
dim tempdata as string
'assign the control as the control from the datagrid
templist = e.item.findcontrol("ddl1")
tempdata = templist.SelectedItem.Value
'if using sqldatasource assign the parameter
sqldatasource.updateparameter.item("data").defaultvalue = tempdata
Of course I haven't tested this yet but when I do I will make updates.
For a better understanding read the article by 4guysfromrolla at this link:
http://www.4guysfromrolla.com/webtech/050801-1.2.shtml