Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
640
UltrawebGrid Error after adding dropdown
posted

Hi, I have an existing ultrawebgrid(version 10.3, service packs up-to-date) that I just tried to add a drop-down to.  The dropdown is populated from a database:

Dim CCQueryString As String = getCostCenters & " '" & globalCompany & "'"

Dim ccAdapt As New SqlDataAdapter(CCQueryString, dbProcurementConnectionString)

Dim ccTable As New DataTable("ccCombo")

Dim ccRow As DataRow

Dim ds As New DataSet

Dim ccValuelist As New Infragistics.WebUI.UltraWebGrid.ValueList()

ccAdapt.Fill(ccTable)

For Each UnitsRow In

ccTable.Rows

ccValuelist.ValueListItems.Add(UnitsRow("costCenter").ToString())

UltraWebGrid1.DisplayLayout.Bands(0).Columns(5).ValueList = ccValuelist

Next

The dropdown and grid loads fine.  The issue occurs after you enter information and tab off the row on the grid. Once you do that, you get this error:

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Infragistics.WebUI.UltraWebGrid.ValueListItemsCollection.System.Web.UI.IStateManager.LoadViewState(Object savedState) +697
   Infragistics.WebUI.UltraWebGrid.ValueList.System.Web.UI.IStateManager.LoadViewState(Object savedState) +309
   Infragistics.WebUI.UltraWebGrid.UltraGridColumn.LoadViewState(Object savedState) +436
   Infragistics.WebUI.UltraWebGrid.UltraGridColumn.System.Web.UI.IStateManager.LoadViewState(Object savedState) +55
   Infragistics.WebUI.UltraWebGrid.ColumnsCollection.System.Web.UI.IStateManager.LoadViewState(Object savedState) +2939
   Infragistics.WebUI.UltraWebGrid.UltraGridBand.System.Web.UI.IStateManager.LoadViewState(Object savedState) +958
   Infragistics.WebUI.UltraWebGrid.BandsCollection.System.Web.UI.IStateManager.LoadViewState(Object savedState) +719
   Infragistics.WebUI.UltraWebGrid.UltraGridLayout.System.Web.UI.IStateManager.LoadViewState(Object savedState) +1418
   Infragistics.WebUI.UltraWebGrid.UltraWebGrid.LoadViewState(Object savedState) +333
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +228
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +144
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +211
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +144
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +211
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +144
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +211
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +144
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +211
   System.Web.UI.Page.LoadAllState() +464
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1849

 

Any ideas on this one?  Thanks in advance!

Parents Reply Children
No Data