When I try to manual reload data in an igGrid I get this error :
Unhandled exception at line 195, column 24879 in http://localhost:55339/Scripts/IG/infragistics.core.js
0x800a139e - Der opstod en JavaScript-kørselsfejl: There was an error parsing/evaluating the JSON string: Tegnet er ugyldigt
This line is marked :
{throw new Error($.ig.DataSourceLocale.errorParsingJsonNoScheme+e.message)}
I use this to update the grid :
$.getJSON("@Url.Content("/Home/Opret_Arrangement")", postData, function (data) {if (data == "OK") {$("#dlgOpretArrangement").igDialog("close");$("#grdDetSker").igGrid("dataBind");}});
Hello Christian ,
Thank you for posting in our forum.
In general the error indicates that the data you’re binding to the grid is not in the correct format or doesn’t contain the fields the grid expected.
Is the grid using a remote data source or a local one?
It would be helpful if you could share a sample which reproduces your issue. If that’s not possible please provide some additional information on the scenario:
1) The grid’s definition (in MVC or html).
2) The databinding logic. (for example if this is an MVC project the Action that returns the data, if it’s in an html page and you’re binding to json then the function where you do that).
I’m looking forward to your reply.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://ko.infragistics.com/support
The Grid Works when I load the page and paging Work alsoIt only fails when I try maual reload the data in Jquery
@(Html.Infragistics().Grid<Intranet.mvc.Models.Det_Sker_I_Dag_Liste>().ID("grdDetSker").PrimaryKey("ID").ShowHeader(false).Columns(column =>{column.For(x => x.Besked).Width("95%");}).Features(feature =>{feature.Paging().PageSize(3).ShowPagerRecordsLabel(false).ShowPageSizeDropDown(false).NextPageLabelText("").PrevPageLabelText("");}).AutoGenerateColumns(false).AutoAdjustHeight(true).Width("100%").DataSource(Model).DataSourceUrl(Url.Action("Hent_DetSker")).DataBind().Render())
[GridDataSourceAction]public ActionResult Hent_DetSker(){CultureInfo ci = CultureInfo.InstalledUICulture;IFormatProvider culture = new CultureInfo("da-DK", true);HttpCookie cDato = HttpContext.Request.Cookies.Get("Dato");DateTime Dato = Convert.ToDateTime(cDato.Value);return View(Dan_DetSkerIDag(Dato).AsQueryable());}
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Developer Support Engineer
I found the problem
If I remove .DataSource(Model) it Works
I think it is because in the controller I put 5 list into one datasource for 5 different partial views
the DataSourceUrl only return the data for this partial view