We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Grid Template column hyperlink printing defect

I'm using version 15.40.20.
There's a way in my ID field in the grid as follows.
All url information comes from direct printing.
In pdf and excel printing, the ID field does not appear at all.
How can I solve the problem?

source code is below:

              .PageSettings(p => { p.PageSize(50); })
              .ClientSideEvents(eve => { eve.DataBound("databound").ActionComplete("actioncomplete").Create("create").ToolbarClick("ToolBarClick"); })
              .ToolbarSettings(toolbar =>
                  toolbar.ShowToolbar().ToolbarItems(items =>
                  toolbar.CustomToolbarItems(new List<object>() { new Syncfusion.JavaScript.Models.CustomToolbarItem() { TemplateID = "#sifirla" } });

              .ClientSideEvents(eve => eve.BeforePrint("beforePrint").ActionBegin("actionbegin"))
              .Mappers(map => map.ExportToExcelAction(Url.Action("ExportToExcel")).ExportToPdfAction(Url.Action("ExportToPdf")))
              .Columns(col =>
                  bool Primary = true;
                  foreach (var item in (IEnumerable<AllClassController.Kolon>)ViewBag.Kolon)
                      if (Primary)
                          Primary = false;

1 Reply

MP Manivannan Padmanaban Syncfusion Team July 24, 2019 09:58 AM UTC

Hi Tayfun, 

Greetings from Syncfusion Support. 

Query: In pdf and excel printing, the ID field does not appear at all. 
How can I solve the problem? 
From the above query we are able to understand that you have facing the issue with hyper link column exporting. To export the grid with columnTemplate we have to set the IsTemplateColumnIncluded as true in the parameter of the export method. We can handle the template elements in server-side event while exporting the grid to various files such as Excel, PDF and Word. We can modify the template column of exporting files using server events. Refer the below help documentation link, 

Also refer the below link for demo, 

Still facing the issue, kindly get back to us with the complete code example of both client and server end. 

Manivannan Padmanaban. 

Live Chat Icon For mobile
Up arrow icon