Telerik RadGrid fix the font size when exporting to Word

353 Views Asked by At

I've a Telerik RadGrid with 11 columns that is getting displayed normally on the web application, however when I try to export this grid to word, it doesn't fit the document width and shows only the very first 6 columns,

I'm using _grid.MasterTableView.ExportToWord(); to export to Word And I've tried to tweak its size a bit using _grid.MasterTableView.Width = Unit.Parse("300mm"); but still some columns are still not visible,

from the Word itself, I've tried to reduce the font size to 10 on the exported document, and I found that this will help displaying the entire grid on one document, however i cannot set set the Font property of the MasterTableView as it has no setter,

is there a way to make sure the entire grid columns will be displayed.

The exported document with hidden columns image

1

There are 1 best solutions below

0
On BEST ANSWER

To solve this I've used

_grid.MasterTableView.Style["font-size"] = "10px";