|
How to pass value from clickable chart into gridview using ASP.NET? |
Posted by Bill Cantor on Nov-26-2011 09:15 |
|
Hi,
I want to pass the value from plotted graph into gridview so that gridview will change the
value if i click the graph in the same page? TIA |
Re: How to pass value from clickable chart into gridview using ASP.NET? |
Posted by Peter Kwan on Nov-28-2011 22:27 |
|
Hi Bill,
To show the data in the gridview, your code can just pass your data to the grid view.
Note that the data come from your code, not from the chart.
There are many methods to detect if a user has clicked on the chart. If you are using the image maps to show tooltips for your chart, you can add an <area> tag that captures mouse actions for the whole chart, like:
WebChartViewer1.ImageMap = c.getHTMLImageMap("..any_url_you_like...", ...your existing image map ...) + "<area shape='rect' coords='0,0,600,300' href='...any_url_you_like...'>";
In the above, please change 300,600 to the actual size of your chart, so that the <area> tag captures the whole chart.
Hope this can help.
Regards
Peter Kwan |
Re: How to pass value from clickable chart into gridview using ASP.NET? |
Posted by Bill Cantor on Nov-30-2011 06:29 |
|
My goal is to display the gridview on the same page. I dont want to use the main gridview
of the chart as hyperlink co'z it was a conditional color format. That's why i need to use the
graph hyperlink. Can i use iframe instead? How to set the target in chart hyperlink? TIA
Bill |
Re: How to pass value from clickable chart into gridview using ASP.NET? |
Posted by Peter Kwan on Dec-01-2011 01:56 |
|
Hi Bill,
The link in ChartDirector is the same as the standard link in HTML. You set the target by using the HTML target attribute, just like in a normal link. For example:
WebChartViewer1.ImageMap = c.getHTMLImageMap("abc.aspx", " ", "target='myIFrame'") + "<area shape='rect' coords='0,0,600,300' href='abc.aspx' target='myIFrame' >";
Hope this can help.
Regards
Peter Kwan |
|