What does mean DeterminePostBackMode
Posted: Mon Apr 16, 2007 1:40 am
There is a onhelp SetCurrentZoom method.
This is the sample code.
private void Page_Load(object sender, System.EventArgs e)
{
MemoryStream tmpChart;
if (Session["ch1"]==null)
{
WebChart1.Chart[0].FillSampleValues();
tmpChart=new MemoryStream();
WebChart1.Chart.Export.Template.Save(tmpChart);
//save template to a Session variable
Session.Add("ch1",tmpChart);
}
else
{
//retrieve the session stored Chart
tmpChart=(MemoryStream)Session["ch1"];
//set the Stream position to 0 as the last read/write
//will have moved the position to the end of the stream
tmpChart.Position=0;
//import saved Chart
WebChart1.Chart.Import.Template.Load(tmpChart);
CheckZoom(WebChart1);
}
}
private void CheckZoom(WebChart wChart)
{
ArrayList zoomedState=(ArrayList)Session[wChart.ID+"Zoomed"];
zoomedState=((Steema.TeeChart.Tools.ZoomTool)wChart.Chart.Tools[0]).SetCurrentZoom(Request,zoomedState,DeterminePostBackMode());
if (zoomedState==null)
Session.Remove(wChart.ID+"Zoomed");
else
Session.Add(wChart.ID+"Zoomed",zoomedState);
}
But when I use this code, nothing happen.
It could not zoom in postback and !postback.
How can I use this code in my program?
Thank you.
This is the sample code.
private void Page_Load(object sender, System.EventArgs e)
{
MemoryStream tmpChart;
if (Session["ch1"]==null)
{
WebChart1.Chart[0].FillSampleValues();
tmpChart=new MemoryStream();
WebChart1.Chart.Export.Template.Save(tmpChart);
//save template to a Session variable
Session.Add("ch1",tmpChart);
}
else
{
//retrieve the session stored Chart
tmpChart=(MemoryStream)Session["ch1"];
//set the Stream position to 0 as the last read/write
//will have moved the position to the end of the stream
tmpChart.Position=0;
//import saved Chart
WebChart1.Chart.Import.Template.Load(tmpChart);
CheckZoom(WebChart1);
}
}
private void CheckZoom(WebChart wChart)
{
ArrayList zoomedState=(ArrayList)Session[wChart.ID+"Zoomed"];
zoomedState=((Steema.TeeChart.Tools.ZoomTool)wChart.Chart.Tools[0]).SetCurrentZoom(Request,zoomedState,DeterminePostBackMode());
if (zoomedState==null)
Session.Remove(wChart.ID+"Zoomed");
else
Session.Add(wChart.ID+"Zoomed",zoomedState);
}
But when I use this code, nothing happen.
It could not zoom in postback and !postback.
How can I use this code in my program?
Thank you.