gustavnavar / Grid.Blazor

Grid component with CRUD for Blazor (client-side and server-side) and ASP.NET Core MVC
GNU Lesser General Public License v2.1
696 stars 134 forks source link

Export html content #376

Closed DDolG closed 1 year ago

DDolG commented 1 year ago

Add column with href. c.Add(o => o.MainBarCode).Titled("BarCode").Encoded(false).Sanitized(false) .RenderValueAs(o => $"{o.MainBarCode}"); When export to excel, the href is view in cell: image But I'm waited only number.

mattiaslundborg commented 1 year ago

I'm having the same issue. Has this been solved?

gustavnavar commented 1 year ago

Package 3.5.1 implements a new RenderExcelAs method in column definition to customize excel columns format.

You can construct a custom display value of the column only for the exported file using the RenderExcelAs method:

    Columns.Add(o => o.Employees.LastName)
       .RenderExcelAs(o => o.Employees.FirstName + " " + o.Employees.LastName)
DDolG commented 1 year ago

Thank you very! Admiro tu ingeniosa biblioteca.