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
100
System.NullReferenceException while setting data source in UltraWinGrid.v8.2
posted

Hi,

I am getting the following error while setting the datasouce of the Wingrid. The error is sporadic. The data source is a list of business objects. 

The line of code is : grid.DataSource = dataSouce;

The error seems to occur when the grid is bound to a list of objects and I try to rebind the grid with a new list of objects (typically I need to do this when there is a new item to be added to the list).

When I inspect this list (of business objects), everything looks okay. None of the objects themselves are null.

I would appreciate any help. Thanks.

 

System.NullReferenceException was unhandled

Message="Object reference
not set to an instance of an object."Source="Infragistics2.Win.UltraWinGrid.v8.2"

StackTrace:

at Infragistics.Win.UltraWinGrid.UltraGridBase.Set_ListManager(Object newDataSource, String newDataMember)

at Infragistics.Win.UltraWinGrid.UltraGridBase.set_DataSource(Object value)

at PortfolioMonitor.UserControls.ObjectGrid.BindGrid(IGridDataBroker obj, UltraGrid grid) in C:\..............

Parents Reply Children