Hi,
I'm having a problem populating a dropdownlist in a datagrid.
The example code I've found on the web use datasets to populate the dropdownlist, however I'm using a collection as below, I've also tried a datatable with the same result:
<asp:TemplateColumn>
<EditItemTemplate>
<asp:DropDownList ID="ProdDDL" Runat=server DataTextField="Prod_Desc" OnSelectedIndexChanged="GetProdTaskData">
</asp:DropDownList>
</EditItemTemplate>
</asp:TemplateColumn>
Dim _PRCol As New FGFM.CollectionClasses.PRODUCTDATACollection
filterPR.Add(PredicateFactory.CompareValue(FGFM.PRODUCTDATAFieldIndex.INCLUDE_GFM, ComparisonOperator.Equal, "Y"))
'daoPR.GetMultiAsDataTable(fieldsPR, dtlPR, 0, sorterPR, filterPR, Nothing, True, Nothing, Nothing, 0, 0)
_PRCol.GetMulti(filterPR)
Dim cnt As Integer
' just to check that I'm getting the correct data
cnt = _PRCol.Count()
'PopulateProdList
ProdDDL.DataSource = _PRCol
ProdDDL.DataTextField = "Prod_Desc"
ProdDDL.DataValueField = "Prod_Desc"
ProdDDL.DataBind()
When I run it I get an exception
System.NullReferenceException: Object reference not set to an instance of an object
Any help would be appreciated
Mike