I have a grid that consists of 1 band (multiple bands actually but only one is visible) that lists a persons name in one column and a nick name in a second column.
What I'm trying to do is to export the grid to a PDF where I only list the column headers one time per page instead of once per row.
I've looked at the various options for the grid band HeaderPlacement property but none of them sound like they give me what I want which is something similar to a MS Word table "Repeat header" as in
HEADER 1 HEADER 2
item a item bitem c item ditem e item f...__________________________________ PAGE BREAK
HEADER 1 HEADER 2etc.....
Is there a property that I'm just missing here.
I beleive the grid does this by default when there is only a single band. So it might be just be an issue with how you are going about hiding the child bands. What you should do is set the layout.ViewStyle to SingleBand. You could do this on the on-screen grid. Or you could do it on the Layout passed into the BeginExport method, if you don't want to affect the on-screen grid.
I'm pretty sure that will work, but if not, you might also want to set the HeaderPlacement property to FixedOnTop and see if that does it.
Mike,
Thanks for the reply. I tried setting the layout viewstyle property in the BeginExport event as you suggested
e.Layout.ViewStyle = ViewStyle.SingleBand;
but it did not make any difference. Since (per the docs) setting the HeaderPlacement property) has no effecdt if ViewStyle is singleband, I took that code out and tried just setting the placement, again no difference. I still get repeated column headers for the band and each row.
You said something about how I was hiding the bands. All I did here was to set the Hidden property on the band to true. Should I be doing simething different here?