This example demonstrates how to override the default exporting process to take into account a custom drawn content provided via the GridView.CustomDrawFooterCell Event
Example Comments
Added By: Ilya Pogorelsky at: 8/16/2012 6:54:56 AM
This only demonstrates drawing the grand total row. Can you please provide a sample that demonstrates a similar technique for drawing custom group footers?
Added By: Ilya Pogorelsky at: 8/16/2012 7:02:45 AMMy Custom Footer Draw event looks like this:
private void DrawFooter(FooterCellCustomDrawEventArgs e)
{
Rectangle rect1;
Rectangle rect2;
GridFooterCellInfoArgs args = e.Info;
string originalText = e.Info.DisplayText;
Rectangle originalBounds = args.Bounds;
SplitBounds(originalBounds, 2, out rect1, out rect2);
args.Bounds = rect1;
e.Painter.DrawObject(args);
args.Bounds = rect2;
productTypeView.RaiseGetFooterCellDisplayText(e);
e.Painter.DrawObject(args);
args.Bounds = originalBounds;
e.Info.DisplayText = originalText;
The problem with the attached sample, is that by the time "e" is passed into this method from the custom printing/eventing code, e.Painter is NULL. So I can't just say e.Painter.DrawObject(...). What should be done instead?
Added By: 'Matt' at: 10/4/2013 4:19:49 AMWhat is the code "Dim isPrinting As Boolean = e.Handled" good for? Is there code missing?
Regards Matt