public ActionResult PdfExport(string gridModel) { GridPdfExport exp = new GridPdfExport(); Syncfusion.EJ2.Grids.Grid gridProperty = ConvertGridObject(gridModel); return(exp.PdfExport <OrdersDetails>(gridProperty, OrdersDetails.GetRecords())); }
private Syncfusion.EJ2.Grids.Grid ConvertGridObject(string gridProperty) { Syncfusion.EJ2.Grids.Grid GridModel = (Syncfusion.EJ2.Grids.Grid)Newtonsoft.Json.JsonConvert.DeserializeObject(gridProperty, typeof(Syncfusion.EJ2.Grids.Grid)); GridColumnModel cols = (GridColumnModel)Newtonsoft.Json.JsonConvert.DeserializeObject(gridProperty, typeof(GridColumnModel)); GridModel.Columns = cols.columns; return(GridModel); }