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
230
Grid Printing
posted

 

Hi ,

Please see the attachment for current ouput (grid1) and expected output (grid2)

Mike had given me sample code for the post (http://forums.infragistics.com/forums/t/43321.aspx). However when I print, I see that all the column header are placed atop each other followed by cell data. However I want column header to be placed atop of cell data then again column header atop of next cell data.

Please see the attachment. The current display of data is of grid 1 in attachment. However I would like to format the data so that the information is displayed as in grid 2 of the same attachment.

Can you please let me know the components that affect this , also any sample data will be of use.

The sample code implemented was - 

private void ultraGrid1_InitializePrintPreview(object sender, Infragistics.Win.UltraWinGrid.CancelablePrintPreviewEventArgs e)
        {
            UltraGridBand band = e.PrintLayout.Bands[0];
            band.RowLayoutStyle = RowLayoutStyle.ColumnLayout;
           
            // Columns 0 through 4 are fine where they are, so we don't need to do anything to them.
            // Adjust columns 5-7 so they are under 0-2.
            for (int i = 5; i < 8; i++)
            {
                UltraGridColumn columnInTopRow = band.Columns["Column " + (i - 5).ToString()];
                UltraGridColumn columnUnderneath = band.Columns["Column " + i.ToString()];

                columnUnderneath.RowLayoutColumnInfo.OriginX = columnInTopRow.RowLayoutColumnInfo.OriginXResolved;
                columnUnderneath.RowLayoutColumnInfo.SpanX = columnInTopRow.RowLayoutColumnInfo.SpanXResolved;
                columnUnderneath.RowLayoutColumnInfo.OriginY = columnInTopRow.RowLayoutColumnInfo.OriginYResolved + columnInTopRow.RowLayoutColumnInfo.SpanYResolved;
            }
        }