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");}});
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
Hello Christian ,
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.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Hello Christian,
I followed the steps you suggested and was unable to reproduce the behavior you're describing.
I have attached the sample project I used to test this. In the sample the data binding method is invoked via a click on the button. After the grid re-binds to the remote data source it works as expected on my side.
If the project does not work correctly on your side, this indicates either a problem possibly specific to your environment, or a difference in the IG versions we are using. My test was performed using version 13.1.20131.2217 of IgniteUI 13.1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Or, if this sample is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.
Please let me know if I can provide any further assistance.
Developer Support Engineer II
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());}
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.