I have an UltraWebGrid that I am exporting to a PDF using the UltraWebGridDocumentExporter. This grid contains hundreds of rows of data that will span multiple pages in the PDF. Is there a way to print the column headers on every page?
Can it be possible to set up text alignment in the rowcell? For example if i want the 2nd column to have alignment to the right which have currency value and want it all it at proper position. Also how can i make one cell wider than the other?
Thanks,
Rob
you can just write
[yourgridname].Columns.FromKey["ProjectID"].Hidden = false;
in your convert to pdf code..
and it will work...
vatt,
I am not in my programming account so I can't test my thought on your question...
However, I think you will want to hide the column in the 'InitializeLayout' event of the grid. I don't think your code is called when it is needed.
If you need to display the ID on the screen, but do not wish to do so on the report, save the grid to a Session variable and open it up in another grid (maybe hidden). I do this by saving to a Session variable then openning up another window to manage the grid and the report.
Hai.
I used the code that works fine. But I want to hide some columns in pdf(But it is in grid) so I used the following code. But dint work. I want to hide projectid column. How can I Do this? Thanks in advance.
foreach (UltraGridColumn c in theGrid.Columns) { if (c.Key == "ProjectID") c.Hidden = true; theHeaderCell = theTable.Header.AddCell(); theHeaderText = theHeaderCell.AddText(); theHeaderText.Style.Brush = new Infragistics.Documents.Graphics.SolidColorBrush(Infragistics.Documents.Graphics.Colors.White); theHeaderText.AddContent(c.Header.Caption);
}
Thanks. It works fine.
How can I hide the columns by using this code? I used as shown below but dint worked in pdf. How can I hide the columns?
foreach (UltraGridColumn c in theGrid.Columns) {
//I want to hide projectid column if (c.Key == "ProjectID") c.Hidden = true; theHeaderCell = theTable.Header.AddCell(); theHeaderText = theHeaderCell.AddText(); theHeaderText.Style.Brush = new Infragistics.Documents.Graphics.SolidColorBrush(Infragistics.Documents.Graphics.Colors.White); theHeaderText.AddContent(c.Header.Caption);