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!
Hello gernblandston,
Please feel free to contact me if you are still experiencing any issues.
Hi gernblandston,
Thank you for your reply.
Is it possible to isolate this behavior in a working sample? I would be happy to look into it to try determine the cause of the issue in this case and hopefully allow you to retain using the viewstate of the grid.
Do not hesitate to contact me with any updates or questions.
Thanks for your reply. Yes, we are aware that the UltraWebgrid has been retired but do not have resources to upgrade our applications yet, so stuck with this older version. I was able to make the error go away by changing viewstate to disoabled. Not sure if that is a good idea and may have introduced a new bug as it now seems like it can't see ntries in the grid
I have tested this scenario with 10.3 build 2217 but am so far unable to replicate the described issue. Attached is my test sample for your reference.
Please note that UltraWebGrid has been retired as of volume 11.2 and is no longer supported. I would therefore suggest considering moving to the AIKIDO toolset. The full list of the retired controls and their respective replacements may be found at:
http://ko.infragistics.com/community/blogs/taz_abdeali/archive/2011/11/17/asp-net-product-changes-in-2011-volume-2.aspx
Online samples demonstrating the AIKIDO control features can also be found at:
http://ko.infragistics.com/samples/aspnet/
Feel free to contact me with any updates or questions.