hi ,
i am using Infragistics.Win.UltraWinGrid.
In my function
{
UltraGridRow[ rows = some source;
UntraGridRow row = rows[0];
// here i am assigning the values into row
row.Cells[column] = value;
row.Update();
}
after the row.Update() - the below error is showing...
Unable to update the row:
Object reference not set to an instance of an object.
i was tried to catch up the exception .. like try-catch in row.Upate.. but that error is not catchable...
pls help me how to catch that exception..
experts , pls help to solve the isssue..
in my case , if i can to hide this issue also ok for me...
That's what I was expecting.
If you're performing updates on the grid (whether directly through the grid's properties or indirectly by updating the grid's data source), this is one of many errors that may intermittently occur. WinGrid is not thread-safe, nor is any other Windows Forms control.
You need to instead perform these changes on the UI thread. This is called "marshalling" the call to the UI thread.
I am getting the error "Unable to update row, object reference not set to an instance of an object." when i try to update a row (like row.update()) in the UltraWinGrid.
Yes, I am using Multiple threads in my application.This errors comes up intermittently. (The error not comes always, sometimes it iscoming and sometimes not.)
Stack Trace :at Infragistics.Win.UIElement.GetDescendant(Type type, Object[ contexts)at Infragistics.Win.UltraWinGrid.UltraGridCell.GetUIElement(RowScrollRegion rsr, ColScrollRegion csr, Boolean verifyElements)at Infragistics.Win.UltraWinGrid.GridItemBase.InvalidateItem(RowScrollRegion rsr, ColScrollRegion csr, Boolean recalcRects)at Infragistics.Win.UltraWinGrid.GridItemBase.InvalidateItemAllRegions(Boolean recalcRects)at Infragistics.Win.UltraWinGrid.UltraGridCell.SetValueInternal(Object value, Boolean suppressErrorMessagePrompt, Boolean fireInitializeRow, Boolean throwExceptionOnError)
at Infragistics.Win.UltraWinGrid.UltraGridCell.set_Value(Object value)
at App.ABC.UI.Report.GR.DC(UltraGridRow row)
I am using Infragistics 7.3 version
Are you using multiple threads in your application? This error might occur if you're updating the grid on a thread other than the UI thread.
Does the error show consistently with every attempt, or does it come up only intermittently?
Can you provide a stack trace? If the error shows up every time, and you're not using threading, this may help point out where to look.
Lastly, what version of the NetAdvantage toolset are you using?
Hi,
I suppose the problem may be in the code that manage after-row-Update events, like InitializeRow, because the exception was throw after you ask to the UG to update the data binded with it.
Also the problem may be in the datasource object (disposed or invalid), because when you set the cell value no data was send back to binded object, only when you call Update() that commits values to the datasource.
I hope that can help you.
Davide