Page 1 of 1

Disable Postback at the zoom of chart.

Posted: Mon Dec 01, 2008 11:20 am
by 13050730
I am trying to disable the postback after zooming in at my tchart. Autopostback has already been set to false. Adding 2 line series on form_load event. Also have set the 'NoClickPoatBack' to true but does not make any difference. zoom is working fine using zoomtool but the problem is with postback. The chart could be zoomed in without any postback. Please halp on the same

Posted: Mon Dec 01, 2008 2:53 pm
by Marc
Hello,

Please check zoomTool's Attributes.NoClickPostback

See this thread for more information:
http://www.teechart.net/support/viewtopic.php?t=7974

Regards,
Marc Meumann

Disable Postback at the zoom of chart.

Posted: Tue Dec 02, 2008 4:30 am
by 13050730
Hi Marc,
Thanks for your reply. I have already tried with NoClickPostBack attribute but it is not doing the job. The problem is when I add a zoomtool to the chart it starts the postback on click or drag of mouse even when the 'Autopostback' property for chart is set to false. I wish to have the zoom feature of chart without postback on any chart event.
Thanks

Posted: Tue Dec 02, 2008 11:53 am
by narcis
Hi Ashutosh,

We are unable to reproduce the problem after setting the AutoPostback property to False and the Attribute to True. Please could you send us an example project that reproduces the problem. Does the problem occur on different browser types?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Disable Postback at the zoom of chart.

Posted: Tue Dec 02, 2008 1:15 pm
by 13050730
Hi NarcĂ­s,
Thanks for the response,
I have uploaded the example application for your reference. Please have a look on the same and let me knoe the needful. Would like to mention here that i want the chart zoom feature without postback of the form. I have set the autopostback of chart false and attribute as true but still when i try to zoom it fires a postback.

Thanks

Posted: Tue Dec 02, 2008 4:01 pm
by narcis
Hi Ashutosh,

Thanks for the example project.

Your project works fine for us here. It postbacks because you have a few click events assigned to the chart. If you don't want it to postback you should disable them.

Re: Disable Postback at the zoom of chart.

Posted: Mon Jun 08, 2015 10:35 am
by 13048879
Hi Ashutosh,

I found the resolution to disable postback with NoClickPostBack = true property not disabling your post back issue. you should be adding zoom tool to series when a session is null (Like, if (Session["ch1"]==null){}). There is an else condition for this Session is not NULL

else//if (Session["ch1"]!=null
{
//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);

((Steema.TeeChart.Tools.ZoomTool)WebChart1.Chart.Tools[0]).Attributes.NoClickPostback = true;

//You can even add hotspots like below if you want
Steema.TeeChart.Tools.SeriesHotspot seriesHotspot1 = new Steema.TeeChart.Tools.SeriesHotspot();
//seriesHotspot1.Style= Steema.TeeChart.Styles.MarksStyles.Value;
seriesHotspot1.GetHTMLMap += new Steema.TeeChart.Tools.SeriesHotspotEventHandler(hotspot1_GetHTMLMap);
seriesHotspot1.MapAction = Steema.TeeChart.Styles.MapAction.Script;
WebChart1.Chart.Tools.Add(seriesHotspot1);


//check whether zoom request is being sent
CheckZoom(WebChart1);
}

This should be resolving the issue with post back as I resolved the same issue in my project