Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
Formatting issues
posted

I have three formatting issues:

- Some of my cells contain "<br/>", it displays two rows in the grid as expected, when I import it to PDF, it displays the string "<br/>" . I have tried to use UltraWebGridDocumentExporter.InitializeRow and UltraWebGridDocumentExporter.RowExporting to replace HTML tag with vbNewLine. The PDF document now as two lines but my grid show eveything in one, as if that function is run on grid.load and not when the export fires.

- My grid has a calculated footer with format set to "C", same as some of my columns. When exporting to PDF columns display value properly $0.00 but not the footer: %240.00

-How do I justify or center the header?

Parents
  • 12333
    Verified Answer
    posted

    Hi,

     For issues 1 and 2 please submit them to Developer Support. I suspect that you are experiencing unintended behavior.

     Issue number 3 can be handled in the following fashion:

    protected void UltraWebGridDocumentExporter1_HeaderCellExporting(

    object sender,

    Infragistics.WebUI.UltraWebGrid.DocumentExport.MarginCellExportingEventArgs e)

    {

    if (null != e.ReportCell)

    {

    e.ReportCell.Alignment =
    new Infragistics.Documents.Report.ContentAlignment();e.ReportCell.Alignment.Horizontal = Infragistics.Documents.Report.Alignment.Center;

    }

    So, in other words, you handle the HeaderCellExporting event and within this event handler, you can access the ITableCell representation of the Header as it will be created on your exported document.

    I am testing to ensure that the e.ReportCell property is not null and if it is not, then I create a new instance of a ContentAlignment object and set it to the Alignment property of e.ReportCell. I then set the Alignment.Horizontal property to Alignment.Center.

     The following API documentation displays the ITableCell members for your reference:

    http://help.infragistics.com/Help/NetAdvantage/NET/2008.1/CLR2.0/html/Infragistics2.Documents.v8.1~Infragistics.Documents.Report.Table.ITableCell_members.html

Reply Children