Im trying to bind a igGrid with data wich have foeign character in field name
this does not work
@(Html.Infragistics().Grid<intranet.mvc5.Models.Opgaver>()
.ID("grdServiceOpgaver")
.PrimaryKey("ID")
.AutoGenerateColumns(false)
.AutoAdjustHeight(true)
.Width("100%")
.Height("650px")
.Columns(column =>
{
column.For(x => x.ID).HeaderText("OPDATER").Width("75px");
column.For(x => x.Oprettet_Dato).HeaderText("OPRETTET DEN").Width("95px").Format("dd-MM-yyyy");
column.For(x => x.Oprettet_Af).HeaderText("OPRETTET AF").Width("60px");
column.For(x => x.Opgave).HeaderText("OPGAVE").Width("250px");
column.For(x => x.Notater).HeaderText("NOTATER");
column.For(x => x.Status).HeaderText("STATUS");
column.For(x => x.Udføres_Af).HeaderText("UDFØRES AF");
column.For(x => x.Forventet_Færdig).HeaderText("FORVENTET FÆRDIG");
column.For(x => x.Læst_Dato).HeaderText("LÆST DEN");
column.For(x => x.Færdig_Dato).HeaderText("FÆRDIG DEN");
})
.RowTemplate("<tr><td><a href='/ServiceOpgaver/Ret/${ID}'><img src='/Content/images/Modify.png' /></a></td><td>${Oprettet_Dato}</td><td>${Oprettet_Af}</td><td>${Opgave}</td><td>${Notater}</td><td>${Status}</td><td>${Udføres_Af}</td><td>${Forventet_Færdig}</td><td>${Læst_Dato}</td><td>${Færdig_Dato}</td></tr>")
.Features(feature =>
feature.Paging().PageSize(8)
.ShowPagerRecordsLabel(false)
.ShowPageSizeDropDown(false)
.NextPageLabelText("")
.PrevPageLabelText("");
.DataSource(Model)
.DataSourceUrl(Url.Action("Hent_ServiceOpgaver"))
.DataBind().Render()
)
[GridDataSourceAction]
public ActionResult Hent_ServiceOpgaver()
return View(Dan_ServiceOpgaver().AsQueryable());
}
List<Opgaver> Dan_ServiceOpgaver()
ServiceOpgaver_TEKEntities db = new ServiceOpgaver_TEKEntities();
var lstOpgaver = from O in db.Opgaver where O.Status < 3 orderby O.Status, O.Oprettet_Dato descending select O;
return lstOpgaver.ToList();
Hello Christian,
After contacting our developers they informed me that the foreign characters are not supported in templating. The Json should consists of ASCII characters in the column keys excluding special characters. Note that the key can also contain space.
If you have any further questions regarding this matter, feel free to contact me.
Sincerely,
Tsanna
This means extra work, because I use Danish character in SQL database
I have to convert my LINQ Query into another model in MVC
If you need any further assistance regarding this matter, please let me know.
Thank you for using Infragistics components.