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
1725
UltraGridDocumentExporter - Controlling Cell width and Row height
posted

I'm trying to find some samples (or better just help) in getting a grid to properly render through the document exporter.

 I have a grid with a couple of bands that I'm trying to export. My issue is that I don't seem to be able to get the contents of the cells to appear without being clipped (row height) or to be able to set a column width no matter what I do.

 I've tried setting row height and cell width properties in the grid InitializeLayout and InitializeRow evants which does not seem to have any impact. I then tried messing with things in the Exporter CellExported event, again it does not seem to make any difference in the resulting output.

I started playing with this because the exporter does not seem to handle the <br/> tag in formatted cell. So I attempted to calculate the cell height/width of the text based on using the grid font and a TextRenderer.MeasureText. This calculates a height and width but when applied to the row/cell it does not seem to  change anything. I've also (just for testing) tried to set the cell width to some fixed size, when the cell is rendered it appears to be set back to the default size of 100. So, again, I'm confused by printing/exporting support in the exporter.

Any pointers to reasonable samples or documentation would be helpful at this point.

Neil