Is it possible to change the way the grid looks when it's exported to PDF?
I have a small grid that I'm putting below a chart (see attached) and I would like to make the grid LOOK better. Maybe just centering the rows vertically would be enough. The grid looks find in the UI.
Is there some magic setting somewhere?
thanks,
Gene
Hi Gene,
Oh, I see. I was confused when you said "centering the rows vertically". It sounds like what you meant was centering the text in the row, not the row itself.
The alignement of the text in the PDF is the same as the alignement of the text in the grid layout being exported. So if you want to make any changes like this, the best place to do it would be in the events of the exporter. The BeginExport event will pass you a clone of the grid's layout. The great part about this is that it's a clone, so you can modify it any way you like and it will affect the export and not the on-screen grid. So you could, for example, do something like this:
e.Layout.Override.CellAppearance.TextVAlign = TextVAlign.Middle;
You can also use the InitializeRow event on the exporter. Once again, the rows in this event are clones of the real grid rows, so you can apply appearances to them without afftecting the on-screen grid.
Mike, I was able to get closer by picked up a CellExporting event. it's not exactly what I want, but it doesn't look that bad.
Thank you for your help and I'll be back if marketing whines about it.
Good morning Mike,
Right now, the text is positioned in the upper left of the cell so it's real close to the cell border and there is space below the text in the cell. It you can see the picture that I attached to the previous post, you might be able to see what I mean.
Maybe another approach would be to lighten up the Cell border so it's not so noticiable.
Since you mentioned "Huge Variety" I figured I missed something. So I'm going to go back and start researching some more to figure out what it is I missed.
thanks again Mike.
There are a huge variety of ways you can modify the appearance of the grid in the exported PDF document without modifying the on-screen grid. But your question is a bit vague, so I'm not sure what you want to do. You mentioned centering the rows vertically, and there is no way to do that, but it's hard to say for sure, because I'm not really sure what that means. Centering them in respect to what?