I am using the latest ultrawebgrid & asp.net3.5
I have an object data source(list), bind it to a simple grid using InitializeDS(Not in a WARP, AJAX enabled )
The grid has check boxes, I am handling updatecell to track the state of the checks.
I update the Database in updatecell depending on the state of the checks and have to reload the grid.
I am trying to assign the updated DS to the grid and call DataBind in UpdateCell.
Running into the following exception:
[NullReferenceException: Object reference not set to an instance of an object.] Infragistics.WebUI.UltraWebGrid.UltraWebGrid.UpdateDBRow(UltraGridRow row, UltraGridRow oldRow) +155 Infragistics.WebUI.UltraWebGrid.UltraWebGrid.ProcessChanges(StateChanges stateChanges, Boolean fireEvents) +1559 Infragistics.WebUI.UltraWebGrid.UltraWebGrid.RaisePostDataChangedEvent() +161 System.Web.UI.Page.RaiseChangedEvents() +165 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1485
I tried setting the DS to null and binding to a null DS( came across these in the forums)
Any thoughts or ideas why this is happening?
thanks,
sam
Has anyone found out why this is happening... I have worked all day on this and can't seem to get rid of this error...
I figured out how to make this work.
In my project I create and bind my grids at runtime. In the Up UpdateCell event on the postback, I write whatever changes I need into the database from the cells that I want changed. Then I rebuild and rebind my grid.
The fix (which I think is a bit HOKEY!) is this:
in the UpdateRow event I added the line:
e.Cancel = True
For some reason, when I update a cell, and then rebind my Grid it seems like the Grid is firing off the UpdateRow event and has a bug in the grid code....
Hello,
Just in case someone else encounters this problem in the future, here is another thread where this problem was solved successfully
http://forums.infragistics.com/forums/t/15686.aspx
I was having the same issue and fixed it by not attempting to rebind the grid data in the UpdateCell event.
Robin