{"action":"created","issue":{"url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net/issues/60","repository_url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net","labels_url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net/issues/60/comments","events_url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net/issues/60/events","html_url":"https://github.com/joeharrison714/MVCGrid.Net/issues/60","id":165923872,"number":60,"title":"PDF and Excel Export support","user":{"login":"projectsphonegapdev1","id":8512746,"avatar_url":"https://avatars.githubusercontent.com/u/8512746?v=3","gravatar_id":"","url":"https://api.github.com/users/projectsphonegapdev1","html_url":"https://github.com/projectsphonegapdev1","followers_url":"https://api.github.com/users/projectsphonegapdev1/followers","following_url":"https://api.github.com/users/projectsphonegapdev1/following{/other_user}","gists_url":"https://api.github.com/users/projectsphonegapdev1/gists{/gist_id}","starred_url":"https://api.github.com/users/projectsphonegapdev1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projectsphonegapdev1/subscriptions","organizations_url":"https://api.github.com/users/projectsphonegapdev1/orgs","repos_url":"https://api.github.com/users/projectsphonegapdev1/repos","events_url":"https://api.github.com/users/projectsphonegapdev1/events{/privacy}","received_events_url":"https://api.github.com/users/projectsphonegapdev1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-16T10:43:18Z","updated_at":"2016-07-20T11:41:49Z","closed_at":null,"body":"Hi,\r\n\r\nHow I can implement a PDF,Excel export engine for MVCGrid?\r\n\r\nBest Regards"},"comment":{"url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net/issues/comments/233925765","html_url":"https://github.com/joeharrison714/MVCGrid.Net/issues/60#issuecomment-233925765","issue_url":"https://api.github.com/repos/joeharrison714/MVCGrid.Net/issues/60","id":233925765,"user":{"login":"shefaliA","id":19940323,"avatar_url":"https://avatars.githubusercontent.com/u/19940323?v=3","gravatar_id":"","url":"https://api.github.com/users/shefaliA","html_url":"https://github.com/shefaliA","followers_url":"https://api.github.com/users/shefaliA/followers","following_url":"https://api.github.com/users/shefaliA/following{/other_user}","gists_url":"https://api.github.com/users/shefaliA/gists{/gist_id}","starred_url":"https://api.github.com/users/shefaliA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shefaliA/subscriptions","organizations_url":"https://api.github.com/users/shefaliA/orgs","repos_url":"https://api.github.com/users/shefaliA/repos","events_url":"https://api.github.com/users/shefaliA/events{/privacy}","received_events_url":"https://api.github.com/users/shefaliA/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T11:41:49Z","updated_at":"2016-07-20T11:41:49Z","body":"Thanks for response Joe.But I am not looking for export option.\nI want to know if I can check anywhere in  controller if Grid already\nexists and if yes can I call Retrieve methods\n\nOn Jul 20, 2016 2:57 AM, \"JardaMaly\" <notifications@github.com> wrote:\n\n> Hi, i have solution but its only \"html Excel\". I create my own\n> GridRenderingEngine like http://mvcgrid.net/demo/customexport <http://url>\n>\n> `\n> using System;\n> using System.IO;\n> using System.Text;\n> using System.Web;\n> using System.Web.UI;\n> using System.Web.UI.WebControls;\n> using MVCGrid.Interfaces;\n> using MVCGrid.Models;\n>\n> namespace ZdravotniVykonyMVC\n> {\n> public class ExcelRenderingEngine : IMVCGridRenderingEngine\n> {\n> public void PrepareResponse(HttpResponse response)\n> {\n> response.Clear();\n> response.ClearHeaders();\n> response.ClearContent();\n> response.AddHeader(\"content-disposition\", \"attachment; filename=Export\" +\n> DateTime.Now.ToFileTime() + \".xls\");\n> response.AddHeader(\"Content-Type\", \"application/Excel\");\n> response.ContentType = \"application/vnd.xls\";\n> response.BufferOutput = false;\n> }\n>\n>     public bool AllowsPaging => false;\n>\n>     public void RenderContainer(ContainerRenderingModel model, TextWriter outputStream)\n>     {\n>\n>     }\n>     public void Render(RenderingModel model, GridContext gridContext, TextWriter outputStream)\n>     {\n>\n>\n>         var htmlWriter = new HtmlTextWriter(outputStream);\n>         Table table = new Table();\n>         table.GridLines = GridLines.Both;\n>\n>         //head\n>         TableRow hlavickaRow = new TableRow();\n>\n>\n>         foreach (var col in model.Columns)\n>         {\n>\n>             TableCell bunka = new TableCell();\n>             bunka.Text = col.HeaderText;\n>             hlavickaRow.Cells.Add(bunka);\n>         }\n>         table.Rows.Add(hlavickaRow);\n>\n>         //rows\n>         foreach (var item in model.Rows)\n>         {\n>\n>             TableRow radek = new TableRow();\n>             foreach (var col in model.Columns)\n>             {\n>                 TableCell bunka = new TableCell();\n>                 bunka.Text = item.Cells[col.Name].PlainText.StripTagsCharArray();\n>                 if (bunka.Text.Contains(\"...\"))\n>                     bunka.Text = bunka.Text.After(\"...\");\n>                 radek.Cells.Add(bunka);\n>\n>             }\n>             table.Rows.Add(radek);\n>         }\n>\n>         StringBuilder sb = new StringBuilder();\n>         StringWriter tw = new StringWriter(sb);\n>         HtmlTextWriter hw = new HtmlTextWriter(tw);\n>\n>         table.RenderControl(hw);\n>\n>\n>\n>         htmlWriter.Write(sb.ToString());\n>     }\n> }\n>\n> }`\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/joeharrison714/MVCGrid.Net/issues/60#issuecomment-233873358>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ATBD4_HPgJOTUYc6kT5tyv59hrHpcW9nks5qXdT3gaJpZM4JN_Ny>\n> .\n>\n"}}
{"actor":{"display_login":"shefaliA"}}