Rash516
07-02-2009, 04:12 PM
Hey,
I have a gridview in which one of the columns is displaying an ID. I have another column which is a template column where I am showing a flash bar graph. How can I get the ID displayed in the ID column to come up in the template column so I can link the bar graph to the corresponding data in mysql using the ID?
<asp:TemplateField>
<HeaderTemplate>
<strong>aBC</strong>
</HeaderTemplate>
<ItemTemplate>
<div id="chartdiv1" align="center"></div>
<script type="text/javascript">
var myChart = new FusionCharts("/bargraph/Charts/HLinearGauge.swf", "myChartId1", "150", "60", "0", "0");
myChart.setDataURL("/bargraph/Gallery/Data/Linear6.xml");
myChart.render("chartdiv1");
</script>
</ItemTemplate>
</asp:TemplateField>
I have highlighted the areas where I would like it to be the ID. Someone from another forum suggested: <%# DataBinder.Eval(Container.DataItem, "ID") %> but I get a compilation error. I dont know if I am using it right.
Thanks
I have a gridview in which one of the columns is displaying an ID. I have another column which is a template column where I am showing a flash bar graph. How can I get the ID displayed in the ID column to come up in the template column so I can link the bar graph to the corresponding data in mysql using the ID?
<asp:TemplateField>
<HeaderTemplate>
<strong>aBC</strong>
</HeaderTemplate>
<ItemTemplate>
<div id="chartdiv1" align="center"></div>
<script type="text/javascript">
var myChart = new FusionCharts("/bargraph/Charts/HLinearGauge.swf", "myChartId1", "150", "60", "0", "0");
myChart.setDataURL("/bargraph/Gallery/Data/Linear6.xml");
myChart.render("chartdiv1");
</script>
</ItemTemplate>
</asp:TemplateField>
I have highlighted the areas where I would like it to be the ID. Someone from another forum suggested: <%# DataBinder.Eval(Container.DataItem, "ID") %> but I get a compilation error. I dont know if I am using it right.
Thanks