search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Export image - events have dissapeared___

Asked by LouLou
12 years ago.

Hi - i've got a problem in exporting an image. It used to work but now all I get is the background and no events

my codee is

protected void ButtonExport_Click(object sender, EventArgs e)
{
// int hourHeight = DayPilotCalendar1.CellDuration * DayPilotCalendar1.CellHeight;
// int hourHeight = DayPilotCalendar1.CellsPerHour * DayPilotCalendar1.CellHeight;
int hourHeight = DayPilotCalendar1.CellDuration * DayPilotCalendar1.CellHeight;
// DayPilotCalendar1.HeightSpec = HeightSpecEnum.BusinessHours; //this sets the printable area - nice___
DayPilotCalendar1.HeightSpec = HeightSpecEnum.Full; //this sets the printable area - nice___


Response.Clear();
Response.ContentType = "image/png";
Response.AddHeader("content-disposition", "attachment;filename=PrintSchedule" + DateTime.Now + ".png");
MemoryStream img = DayPilotCalendar1.Export(ImageFormat.Png, 9 * hourHeight);
// MemoryStream img = DayPilotCalendar1.Export(ImageFormat.Png, 9 * 10);
img.WriteTo(Response.OutputStream);
Response.End();

}

Any ideas?
Thanks LL

Comment posted by Bbq
12 years ago.
I think it is a bug Loulou. The same thing happened to me.
Comment posted by Dan Letecky
12 years ago.

I'm not able to reproduce this bug - it seems to work fine with the latest version (5.9 SP2).

Please note that if you have turned ViewState off you have to call DataBind() before exporting the image.

Comment posted by Dan Letecky
12 years ago.

Just a note - it's no longer necessary to specify the scrolling position in the Export() method - unless you want to override the current scrollbar position.

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.