I have my grid set up with a datasource pulling from an ADO .NET Entity Framework model.
Controller
model.GridModel.DataSource = _db.InstrumentLists.Where(clause, SearchTerm) .ToList<InstrumentList>() .OrderBy(x => x.Tag) .AsQueryable<InstrumentList>();
View
@( 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.GridModel.CheckNullables() +341 Infragistics.Web.Mvc.GridModel.DataBind() +1173 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 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +207 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +81 System.Web.WebPages.StartPage.RunPage() +19
Hello danenatoli,
The service release with build 2017 should be available for download now.
Please let us know if you need further assistance
Great! Thanks Angel.
hi,
I have notified our Developer Support Manager, and will follow up with you as soon as I have details about the download. Thank you!
Angel
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.
Hi,
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.
Thanks,