I'm a relative newbie to asp.net and am having an issue that is getting frustrating. I have page that has an Infragistics UltraWebGrid on it. One of the columns on the grid has a dropdown list. On initial load, it all works great, but on post back I get :Object reference not set to an instance of an object. I put a trace on and can see that it is throwing an "Unhandled Execution Error" at this line:
at Infragistics.WebUI.UltraWebGrid.UltraGridBand.Syst em.Web.UI.IStateManager.LoadViewState(Object savedState)
Here is the code that seems to be the offender:
Dim UnitsCmbAdapt As New SqlDataAdapter(GetMeasureUnits, dbProcurement_DevConnectionString)
Dim UnitsCmbTable As New DataTable("UnitsCombo")
Dim UnitsRow As DataRow
Dim ds As New DataSet
Dim UnitsValuelist As New Infragistics.WebUI.UltraWebGrid.ValueList()
If Not IsPostBack() Then
For Each UnitsRow In UnitsCmbTable.Rows
UltraWebGrid1.DisplayLayout.Bands(0).Columns(2).ValueList = UnitsValuelist
UltraWebGrid1.DisplayLayout.CellClickActionDefault = Infragistics.WebUI.UltraWebGrid.CellClickAction.Edit
I need the "ViewState" set to true as I need to hold the values of some of the form controls. I've spent a lot of time looking into this and think that I am not instantiating something correctly - but I'm not sure. I did not post this on the Infragistics forums as I don't believe the grid is the issue itself.
I truly appreciate any help you can give!