Hi,
Trying to format the information when exported to excel. Treid following examples online but nothing is working. What it does now is export but nothing is alligned. Need all columns centered on export and the gridlines created. What command do I do this on and what Css works becuase what i am doing is not.
Trying to format the information when exported to excel. Treid following examples online but nothing is working. What it does now is export but nothing is alligned. Need all columns centered on export and the gridlines created. What command do I do this on and what Css works becuase what i am doing is not.
Protected Sub myIssueGrid_ExportCellFormatting(sender As Object, e As ExportCellFormattingEventArgs) Handles myIssueGrid.ExportCellFormatting Dim item As GridDataItem = DirectCast(e.Cell.Parent, GridDataItem) If item.ItemType = GridItemType.AlternatingItem Then item.Style("horizontal-align") = "middle" Else item.Style("horizontal-align") = "middle" End If End Sub If e.CommandName = "ExportToExcel" Then IsExport = True myIssueGrid.Columns(0).Visible = False End If<CommandItemTemplate> <table width="100%"> <tr> <td style="width:50%"><asp:LinkButton ID="lnkTransfer" runat="server" CommandName="Trans" Text="Click to Transfer Items" Font-Underline="true"></asp:LinkButton></td> <td style="width:50%" align="right"><asp:Button ID="btnExport" runat="server" CommandName="ExportToExcel" Text="Export Excel" /></td> </tr> </table> </CommandItemTemplate>