I have my grid set up with a datasource pulling from an ADO .NET Entity Framework model.
model.GridModel.DataSource = _db.InstrumentLists.Where(clause, SearchTerm) .ToList<InstrumentList>() .OrderBy(x => x.Tag) .AsQueryable<InstrumentList>();
@( Html.Infragistics().Grid("InsrumentListGrid", Model.GridModel)
I am setting the DataSource and not the DataSourceUrl on purpose - all the paging, filtering and sorting is done client side.
The records that are pulled out depend on a search string, hence the Where clause. If the result of the call is zero records, the grid crashes with a Null Reference Exception.
Here's the top of the stack:
[NullReferenceException: Object reference not set to an instance of an object.]
Infragistics.Web.Mvc.InfragisticsSuite`1.Grid(String id, IGridModel gridViewModel) +278
ASP._Page_Views_InstrumentList_Index_cshtml.Execute() in c:\Users\DNatoli\Documents\Visual Studio 2010\Projects\ICMDB\ICMDB\Views\InstrumentList\Index.cshtml:39
This has been already reported some time ago, and is fixed. I believe you can find it in the latest service release. The internal issue number, for your reference, is: 81052.
Which service release would that be? I installed a service release (version 18.104.22.1680) and its still happening.
I see there is another service release (22.214.171.1247) on the jQuery products download list, however I have NetAdvantage for .NET 2011 Vol. 1 so it won't let me download it. I've checked the service releases under My Keys & Downloads and the latest release I can find on there is 126.96.36.1990.
I checked that the fix is in build 11.1.20111.2017. That was released on 25th of July. The service release with build 2010 was released on 6th of July. Let me know if you can't find the 25th July SR with build 2017 and I will let you know how I can help.
I can't seem to find it, and the platform installer gives me an error when I try to download the updates. If you could link me to the download that would be great.