ExportToExcel on extended Grid

0 Answers 67 Views
Grid
Ellishia
Top achievements
Rank 1
Ellishia asked on 04 Apr 2022, 09:51 AM

The project I am working on, uses Grids and for some reason it has extended (customized styling and other functionalites)  RadGrids with extended Column as well (see an extract of the class below). 

When I use the functionality exportToExcel in a telerik RadGrid, it works like I want but on the extended RadGrids it doesn't export the grid to a file but it replaces the grid on the UI. Page (I have attached two images, one with the exportToExcel button and the other with the "exported" table)  . Do I also need to write a customized ExportToExcel function? or how could I approach this issue? 

Thanks in advance.

 

 

public class DefaultGridBoundColumn:GridBoundColumn
{
public int ColumnWidth { get; set; }

public DefaultGridBoundColumn()
{
AllowFiltering = false;
ColumnWidth = -1;
}

public override void Initialize()
{
if (ColumnWidth >= 0)
{
base.HeaderStyle.CssClass = (base.HeaderStyle.CssClass + " col-md-" + ColumnWidth).Trim();
base.ItemStyle.CssClass = (base.ItemStyle.CssClass+ " col-md-" + ColumnWidth).Trim();
}
base.Initialize();
}
}
}

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Ellishia
Top achievements
Rank 1
Share this question
or