I'm using the Rad Grid's ExportToPDF functionality but I'm having trouble getting the column headers aligned properly.
I'm talking about the alignment of these headers in the saved PDF document. The are shifted to the right currently.
GRID:
Button Click that triggers ExportToPDF:
Any advice on getting the column headers properly aligned would be much appreciated.
I'm talking about the alignment of these headers in the saved PDF document. The are shifted to the right currently.
GRID:
<rad:RadGrid ID="activityLogListRadGrid" AllowPaging="True" AllowSorting="true" GridLines="Horizontal" |
HorizontalAlign="Center" ShowFooter="true" ShowStatusBar="true" |
EnableAJAX="True" EnableAJAXLoadingTemplate="True" LoadingTemplateTransparency="25" |
Skin="Grid" SkinsPath="~/App_Themes/VertexDefault" |
PageSize="18" AutoGenerateColumns="False" OnItemDataBound="activityLogListRadGrid_ItemDataBound" |
OnSortCommand="activityLogListRadGrid_SortCommand" |
OnNeedDataSource="activityLogListRadGrid_NeedDataSource" OnItemCommand="activityLogListRadGrid_ItemCommand" runat="server" > |
<SortingSettings SortToolTip="Click to sort" /> |
<ExportSettings IgnorePaging="true" OpenInNewWindow="true"> |
<Pdf AllowAdd="false" AllowCopy="true" AllowModify="true" AllowPrinting="true" Author="Anonymous" |
Keywords="None" PageWidth="1000" PageBottomMargin="1in" PageLeftMargin="1in" PageRightMargin="1in" |
PageTopMargin="1in" PageTitle="Activity Log Detail" |
Subject="RadGrid Export" Title="Activity Log Detail" PaperSize="Letter" /> |
</ExportSettings> |
<PagerStyle AlwaysVisible="true" Height="25px" Mode="NumericPages" Position="Bottom" /> |
<MasterTableView DataKeyNames="CustomerID,CreateUserID,CreateDateTime" |
TableLayout="Auto" AllowNaturalSort="false" Style="border: 0px solid #eaf2fd;" BorderColor="Black"> |
<SortExpressions> |
<rad:GridSortExpression FieldName="CreateDateTime" SortOrder="Ascending" /> |
</SortExpressions> |
<Columns> |
<rad:GridBoundColumn HeaderStyle-Width="200px" DataField="CreateDateTime" HeaderText="Activity Date" SortExpression="CreateDateTime" |
UniqueName="CreateDateTime" DataFormatString="{0:MM/dd/yyyy}" ItemStyle-Wrap="False" /> |
<rad:GridHyperLinkColumn HeaderStyle-Width="200px" DataTextField="EventName" DataNavigateUrlFields="EventID" |
DataNavigateUrlFormatString="~\Returns\ActivityLogDetail.aspx?EventID={0}" HeaderText="Event Name" SortExpression="EventName" UniqueName="EventName" /> |
<rad:GridBoundColumn HeaderStyle-Width="200px" DataField="LastNameFirstName" HeaderText="User" SortExpression="LastNameFirstName" |
UniqueName="LastNameFirstName" ItemStyle-Wrap="False" /> |
<rad:GridHyperLinkColumn HeaderStyle-Width="215px" DataTextField="CustomerName" DataNavigateUrlFields="EventID" |
DataNavigateUrlFormatString="~\Returns\ActivityLogDetail.aspx?EventID={0}" HeaderText="Customer" SortExpression="CustomerName" UniqueName="CustomerName" /> |
</Columns> |
<PagerTemplate> |
<vtx:GridPager ID="gridPagerControl" runat="server" /> |
</PagerTemplate> |
</MasterTableView> |
</rad:RadGrid> |
Button Click that triggers ExportToPDF:
protected void pdfExportButton_Click(object sender, EventArgs e) |
{ |
log.Debug("pdfExportButton_Click"); |
activityLogListRadGrid.ExportSettings.IgnorePaging = true; |
activityLogListRadGrid.ExportSettings.OpenInNewWindow = true; |
activityLogListRadGrid.MasterTableView.ExportToPdf(); |
} |
Any advice on getting the column headers properly aligned would be much appreciated.