sreeram amulya

sreeram amulya

  • NA
  • 104
  • 11.1k

Kendo Grid

Apr 18 2015 3:57 AM
 I am trying to Export to Excel  in kendo grid unable to download the large number of records. Here it is my code please help me.
 
<script type="text/javascript">     for (var i = 1; i <= 12; i++)     {         $("#searchValue").append("<option value='" + i + "'>" + i + "</option>")     }     $.each(["Week", "Month", "Year"], function (i, item)     {         $("#searchType").append("<option value='" + item + "'>" + item + "(s)</option>")     });       var grid;     function loadInteractionTable()     {         debugger;         if (typeof grid !== 'undefined')         {             grid.data().kendoGrid.destroy();             grid.empty();         }         grid = $("#interactionDetailsTable").kendoGrid({             toolbar: ["excel"],             excel: {                 autoBind: false,                 fileName: "Interaction.xlsx",                 allPages: true,                               //proxyURL: '@Url.Action("Excel_Export_Save", "Interaction")',                 filterable: true             },             dataSource: {                 transport: {                     read: {                         url: "/api/v1/Interaction/list/" + $("#searchType").val() + "/" + $("#searchValue").val(),                         dataType: "json"                     }                 },                 schema: {                     model: {                         fields: {                         Timestamp: { type: "date"},                             ApplicationName: { type: "string" },                             UserName: { type: "string" },                             UWA_ANALYTICS_USER_SESSION_DETAILS_Id: { type: "number" },                             InteractionName: { type: "string" },                             InteractionType: { type: "string" },                             ServicesTouched: { type: "string" },                             Source: { type: "string" },                             SourceIdentifier: { type: "string" },                             Destination: { type: "string" },                                                    }                     }                 },                 pageSize: 30,                 sort: { field: "Timestamp", dir: "desc" }             },             selectable: false,             pageable: {                 buttonCount: 5             },             height: window.screen.height,             sortable: true,             reorderable: true,             groupable: true,             resizable: true,             filterable: true,             columnMenu: true,             pageable: {                 buttonCount: 5             },             sortable: true,             //sort: { field: "Timestamp", dir: "desc" },             columns: [                             {                                 field: "Timestamp", title: "Time stamp", locked: true, width: 203, format: "{0:MM/dd/yyyy HH:mm tt}", filterable: {                                     ui: "datetimepicker",                                     dir: "desc"                                 }                             },                             { field: "ApplicationName", title: "Application Name", width: 200 },                             { field: "UserName", title: "User Name", width: 200 },                             { field: "UWA_ANALYTICS_USER_SESSION_DETAILS_Id ", title: "UWA_ANALYTICS_USER_SESSION_DETAILS_Id", width: 200 },                             { field: "InteractionName", title: "Interaction Name", width: 200 },                             { field: "InteractionType", title: "Interaction Type", width: 200 },                             { field: "ServicesTouched", title: "Services Touched", width: 200 },                             { field: "Source", title: "Source", width: 200 },                             { field: "SourceIdentifier", title: "SourceIdentifier", width: 200 },                             { field: "Destination", title: "Destination", width: 200 },                                       ]         });     }     loadInteractionTable();     $("#reload").click(function ()     {         loadInteractionTable();     }); </script>
 

Answers (1)