I have the following method:
public JsonResult SupItemPriceList() { GenericGridModel ggm = new GenericGridModel(); EnumerableQuery<ISupplyItem> recs = new EnumerableQuery<ISupplyItem>(new SupplyItemManager().GetAllSupplyItemPrices()); if (recs.Count() == 0) { return null; } ggm.GridFiltering.DataSource = recs; return ggm.GridFiltering.GetData(); }
This appears to work fine when running the app. When I run it in a unit test where I have multiple threads hitting this and similar methods simultaneously (as part of a stress test), I get a NullReferenceException in the return line.
The stack trace is:
at Infragistics.Web.Mvc.GridModel.DataBindInternal() at Infragistics.Web.Mvc.GridModel.DataBind() at Infragistics.Web.Mvc.GridModel.GetData() at GEMS.Web.Controllers.SupplyInventoryController.SupItemPriceList() in s:\[... my directory ...]\Controllers\SupplyInventoryController.cs:line 146
In this particular case, recs always contains 267 records.
What's wrong?
Hey Pete,
Did you manage to resolve your issue? From the stack trace which you posted it's not clear on which line in the DataBindInternal method the error is thrown.
Also, what is you Ignite UI version of the Infragistics.Web.Mvc.dll?
Best regards,Martin PavlovInfragistics, Inc.
That is the full stack trace. GenericGridModel has the GridFiltering property which is a GridModel which is instantiated by new GridModel(). Everything is the default value. It's identical to the implementation of GridFilteringModel in this sample http://ko.infragistics.com/products/jquery/sample/grid/filtering
Hi,
Could you post the full stack trace as well as the properties you set when you configure the grid model (GenericGridModel) ?
Thanks,
Angel