Home Unanswered Active Tags New Question

Export image - events have dissapeared___

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

Asked by LouLou 1 year ago.
Replies
I think it is a bug Loulou. The same thing happened to me.
Comment posted by Bbq 1 year 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 1 year 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.

Comment posted by Dan Letecky 1 year ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java