Platform Details: IgniteUI, C#, Asp.Net Core 2.0 (MVC), HTML5 and basic JS
I need help understanding what this error is and why it's being thrown. I've tried googling it, but the only info I've found points to things being loaded out of order. We use the iggrid elsewhere without issue, so I thought the libraries and assemblies (and ordering) were covered from that. The error reads:
"MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Infragistics.Web.Mvc.Resources.CommonStrings.resources" was correctly embedded or linked into assembly "Infragistics.Web.AspNetCore" at compile time, or that all the satellite assemblies required are loadable and fully signed."
The page consumes a file and provides feedback in the form of a grid. The feedback is calculated, and passed via view model to the page. Here is the view model:
namespace GCFF.Web.Models
{
public class MassUploadViewModel
{
public int? recordsRead { get; set; }
public int recordsModified { get; set; }
public int recordsUnmodifiedCancelSAP { get; set; }
public int recordsUnmodifiedAmount { get; set; }
public int failedMultiple { get; set; }
public int failedNoMatch { get; set; }
public GridModel FailedItemsGrid { get; set; }
}
}
In my controller, I set each of those properties, call to a method to set the grid properties, I build a list and set that as the data source and then return the model. Here is (some of) that code:
var failedRequestsList = new List<MassUploadRequest>();
foreach (MassUploadRequest m in requests.Where(t => t.Response == "Failed - Matched Multiple")) {
failedRequestsList.Add(m);
}
model.recordsRead = requests.Count();
model.failedMultiple = requests.Count(t => t.Response == "Failed - Matched Multiple");
model.FailedItemsGrid = SetMUGridProperties();
model.FailedItemsGrid.DataSource = failedRequestsList;
return View(model);
The SetMUGridProperties method sets the parameters for the ifGrid, and is as follows:
public GridModel SetMUGridProperties()
{
GridModel grdmodel = new GridModel();
grdmodel.AutoGenerateColumns = false;
grdmodel.Width = "100%";
grdmodel.Height = "445px";
grdmodel.DefaultColumnWidth = "*";
grdmodel.PrimaryKey = "RequestID";
grdmodel.ResponseDataKey = "Records";
grdmodel.RenderCheckboxes = false;
grdmodel.AutoCommit = false;
grdmodel.EnableUTCDates = true;
GridColumn RequestID = new GridColumn();
RequestID.Key = "RequestID";
RequestID.HeaderText = "Request ID";
RequestID.DataType = "number";
RequestID.Width = "90px";
GridColumn RTC = new GridColumn();
RTC.Key = "rtcCode";
RTC.HeaderText = "RTC";
RTC.DataType = "string";
RTC.Width = "85px";
GridColumn TemplateID = new GridColumn();
TemplateID.Key = "TemplateID";
TemplateID.HeaderText = "Template ID";
TemplateID.DataType = "number";
TemplateID.Width = "90px";
GridColumn FCItemDate = new GridColumn();
FCItemDate.Key = "FCItemDate";
FCItemDate.HeaderText = "Date";
FCItemDate.DataType = "date";
FCItemDate.DateDisplayType = DateDisplayType.UTC;
FCItemDate.Width = "95px";
FCItemDate.ColumnCssClass = "borderright";
GridColumn Amount = new GridColumn();
Amount.Key = "Amount";
Amount.HeaderText = "Amount";
Amount.DataType = "number";
Amount.Format = "0.00";
GridColumn AmountTMSUpload = new GridColumn();
AmountTMSUpload.Key = "AmountTMSUpload";
AmountTMSUpload.HeaderText = "Amount - TMS Upload";
AmountTMSUpload.DataType = "number";
AmountTMSUpload.Format = "0.00";
GridColumn Response = new GridColumn();
Response.Key = "Response";
Response.HeaderText = "Failed Reason";
Response.DataType = "string";
grdmodel.Columns.Add(RequestID);
grdmodel.Columns.Add(RTC);
grdmodel.Columns.Add(TemplateID);
grdmodel.Columns.Add(FCItemDate);
grdmodel.Columns.Add(Amount);
grdmodel.Columns.Add(AmountTMSUpload);
grdmodel.Columns.Add(Response);
GridSorting sorting = new GridSorting();
sorting.Mode = SortingMode.Single;
sorting.ColumnSettings = new List<ColumnSortingSetting>() { new ColumnSortingSetting() { ColumnKey = "Response", AllowSorting = false } };
grdmodel.Features.Add(sorting);
GridResizing resizing = new GridResizing();
resizing.AllowDoubleClickToResize = true;
grdmodel.Features.Add(resizing);
GridFiltering filtering = new GridFiltering();
filtering.ColumnSettings = new List<ColumnFilteringSetting>() { new ColumnFilteringSetting() { ColumnKey = "RequestID", AllowFiltering = false } };
grdmodel.Features.Add(filtering);
return grdmodel;
}
Finally, here is (most of) the page code that this is all going with.
@using Infragistics.Web.Mvc
@model GCFF.Web.Models.MassUploadViewModel
@{
ViewData["Title"] = "Mass Upload";
Layout = "_Layout";
}
@using (Html.BeginForm("MassUpload", "Forecast", FormMethod.Post, new { @enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
~upload input
~submit button
~feedback section
@(Html.Infragistics().Grid(Model.FailedItemsGrid))
}
<script type="text/javascript">
$(function () {
var recordsRead = '@Model.recordsRead';
if (recordsRead == '') {
$('#uploadresults').hide();
}
else {
$('#recordsRead').text('@Model.recordsRead');
$('#failedMultiple').text('@Model.failedMultiple');
}
});
</script>
We figured it out. I have filtering turned on for the grid in the properties with this
GridFiltering filtering = new GridFiltering();
filtering.ColumnSettings = new List<ColumnFilteringSetting>() { new ColumnFilteringSetting() { ColumnKey = "RequestID", AllowFiltering = false } };
grdmodel.Features.Add(filtering);
But the datasource object was not in a queryable format, so it caused the igGrid to fail. Here is the fix (the AsQueryable())
model.FailedItemsGrid.DataSource = failedRequestsList.AsQueryable();