Default.aspx <ej:Grid ID="gridDataReport" runat="server" AllowPaging="true"> <DataManager URL="Default.aspx/GetData" Adaptor="WebMethodAdaptor" /> <Columns> <ej:Column Field="FechaInforme" ></ej:Column> <ej:Column Field="IdTeam" ></ej:Column> </Columns>
</ej:Grid>
Default.aspx.cs
using Syncfusion.Linq;
[WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static List<InformeDiarioGas> GetData(Syncfusion.JavaScript.DataManager value) { var db = new Model1();
IEnumerable result = db.InformeDiarioGas.ToList<InformeDiarioGas>();
int count = result.AsQueryable().Count(); Syncfusion.JavaScript.DataSources.DataOperations operation = new Syncfusion.JavaScript.DataSources.DataOperations(); result = operation.Execute(result, value); return new { result = result, count = count }; |
So we suggest you to upgrade your product to the latest version 13.3.0.12 version.
Please follow the below steps to upgrade to 13.2.0.34 to 13.3.0.12.
1. Download and install the Essential Studio v13.3.0.12 from the below link.
2. Replace the Syncfusion dlls, scripts, and css in your project from the following location.
Scripts and Css: C:\Program Files (x86)\Syncfusion\Essential Studio\XX.X.X.XX\JavaScript\assets
Dlls: C:\Program Files (x86)\Syncfusion\Essential Studio\ XX.X.X.XX \Assemblies
Here XX.X.X.XX denotes the product version(13.3.0.12).
We have modified your sample (in version 13.3.0.12) and the same can be downloaded from the following link,
https://www.syncfusion.com/downloads/support/directtrac/general/WEBAPP~32140304254.ZIP
Refer to the below code example,
[WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public static object GetData(Syncfusion.JavaScript.DataManager value, int? EmployeeID) { var db = new Model1();
IEnumerable result = db.InformeDiarioGas.ToList<InformeDiarioGas>();
int count = result.AsQueryable().Count(); Syncfusion.JavaScript.DataSources.DataOperations operation = new Syncfusion.JavaScript.DataSources.DataOperations();
result = operation.Execute(result, value); return new { result = result, count = count }; } |
We can get the additional parameter as highlighted in the above code example.
If we misunderstood your requirement please share the stack trace of the issue and the provided information will help to analyze the issue and provide you the response as early as possible.
Regards,
Gowthami V.
protected void FlatGrid_ServerExcelExporting(object sender, Syncfusion.JavaScript.Web.GridEventArgs e) { var db = new Model1(); ExcelExport exp = new ExcelExport(); exp.Export(gridDataReport.Model, (IEnumerable)db.InformeDiarioGas.ToList<InformeDiarioGas>(), "Export.xlsx", ExcelVersion.Excel2010, true, true, "flat-lime"); |