asp.net dropdown iniside datagrid
Posted
by harold-sota
on Stack Overflow
See other posts from Stack Overflow
or by harold-sota
Published on 2010-04-23T19:33:53Z
Indexed on
2010/04/24
11:13 UTC
Read the original article
Hit count: 250
I'm inserting a dropdwon list in datagrid on row editing. When i run the project the datasource is not rekognized. The asp.net part is there:
<asp:TemplateField HeaderText="Lookup 1">
<EditItemTemplate>
<asp:DropDownList
ID="Loocup1DropDownList"
Width="100%"
runat="server"
DataSource ="<%GetValueForDropDownCombinationContent()%>"
DataValueField="LOOKUP_ID"
DataTextField="lookup_name" >
</asp:DropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LOOKUP1_NAME" runat="server" Text='<%# Bind("LOOKUP1_NAME") %>'></asp:Label>
</ItemTemplate>
This is the vb.net function:
Protected Function GetValueForDropDownCombinationContent() As DataSet
Dim dsProductLookups As New DataSet
dsProductLookups = DocumentManager.Data.DataRepository.Provider.ExecuteDataSet("sp_GetCombinationsLookups", productCombo.SelectedValue)
Return dsProductLookups
End Function
any ideas???
© Stack Overflow or respective owner