@(Html.EJ().Grid<object>("VarlikListele")
.Datasource(datasource => datasource.Json(ViewBag.Varlik).RemoveURL("VarlikSilJson").Adaptor(AdaptorType.RemoteSaveAdaptor))
.AllowSorting()
.AllowPaging()
.ClientSideEvents(e => e.ActionBegin("actionBegin"))
.AllowResizeToFit()
.EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.InlineForm); })
.PageSettings(p => { p.PageSize(15); })
.AllowSearching()
.ToolbarSettings(toolbar =>
{
toolbar.ShowToolbar().ToolbarItems(items =>
{
items.AddTool(ToolBarItems.Search);
items.AddTool(ToolBarItems.ExcelExport);
items.AddTool(ToolBarItems.PdfExport);
items.AddTool(ToolBarItems.PrintGrid);
});
})
.Mappers(map => map.ExportToExcelAction(Url.Action("ExportToExcel")).ExportToPdfAction(Url.Action("ExportToPdf")).ExportToWordAction(Url.Action("ExportToWord"))
)
.Columns(col =>
{
bool Primary = true;
foreach (var item in (IEnumerable
)ViewBag.Kolon) {
if (Primary)
{
col.Field(item.KolonKod).HeaderText(item.KolonAdi).Template("#SistemID").Width(100).IsPrimaryKey(true).Add();
Primary = false;
}
else
{
col.Field(item.KolonKod).HeaderText(item.KolonAdi).Add();
}
}
}))
controller:
{
GridProperties obj = ConvertGridObject(GridModel);
JavaScriptSerializer serializer = new JavaScriptSerializer();
//obj.Columns.ForEach(x=>x.Field=StringReplace(x.Field));
Type test = GetTableType(obj);
var inst = Array.CreateInstance(test, 1);
var DataSource = JsonConverter.Deserialize<object>(
YeniKolonGetir(Session["VarlikID"] as string[], Session["VarlikKolon"] as string[]).Data.ToString());
string griddata = serializer.Serialize(DataSource);
// griddata = StringReplace(griddata);
dynamic data = serializer.Deserialize(griddata, inst.GetType()) as object[];
PdfExport exp = new PdfExport();
exp.Export(obj, data, "Export.pdf", false, false,true,"flat-saffron");
}
I added a visual from the stack.
I cleared the Turkish characters from the title and content, but the problem persists.
I tried that code.The result does not change
exp.Export(obj, data, "Export.pdf", false, false,true,"flat-saffron");
result:
will you take a look?