The feature request is to be able to customize the GridCsvExportOptions and GridExcelExportOptions from the API methods -
It will be useful to be able to customize the columns and data to be exported.
===
Telerik edit:
A possible workaround is to click the built-in Grid export buttons with JavaScript. With this approach, you will be able to use the built-in export options and events. Here is a REPL example.
Hello Nitesh,
I see your point and we are discussing the scope of this task now.
Regards,
Dimo
Progress Telerik
Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024
Hi Stamo,
Any basic functionality i would still expect from telerik grid to provide out of the box like choose which columns from the binded grid list to export.
its a additional effort and training or knowledge which has to be keep on passing to next generation to make them understand why and how certain things are going to work if they need to replicate same in any other projects.
I am not expecting very advanced scenarios to be supported, but atleast just a minimum scenario which can be achieved out of the box will be good.
Hi,
After inspecting the request, it turns out that exposing additional export options might be useful for some concrete basic scenarios, but covering more general scenarios (read below) will be hard to configure by the developer.
For example, if there is an option to configure which columns and data should be exported, then the Telerik Blazor Grid component will not be necessary - in fact, this functionality can be achieved even outside of the Blazor framework as the exported columns and data may not be even present in the Grid - they can be any other columns and data.
Suppose that there is some kind of a helper class that allows exporting any data to an Excel file:
var exportedData = TelerikBlazorExportHelper.ExportToExcel(new TelerikExcelExportOptions()
{
FileName = "excel-export.xslx"
Columns = new List<ColumnDescriptor>()
{
new ColumnDescriptor()
{
Field = "ProductName"
...
}
...
},
Data = ...
})
In addition, more complex scenarios with the Grid will require passing additional arguments that are not trivial for the developer to configure - consider a grouping scenario, where aggregates should be calculated for the given data set, their names should be localized, etc.
Another example is multi-column headers, where the developer will need to calculate the offsets of the parent and child columns manually. If the end user reorders or shows/hides certain columns, this will require recalculating the multi-column headers.
Regards,
Stamo Gochev
Progress Telerik
Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024