Hi,
I was trying to use the chart control in my sharepoint webpart but i can see only a broken image.
i have copied the RadChart.Net2 dll to the gac and the safe control entry is given below
<SafeControl Assembly="RadChart.Net2, Version= 3.1.2.0,Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763" Namespace="Telerik.Charting" TypeName="*" Safe="True" />
<SafeControl Assembly="RadChart.Net2, Version= 3.1.2.0,Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763" Namespace="Telerik.WebControls" TypeName="*" Safe="True" />
I have copied the radcontrols folder to "C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources"
and my code is :
public class CustomerPortal : System.Web.UI.WebControls.WebParts.WebPart
{
RadChart radChart = new RadChart();
protected override void Render(HtmlTextWriter writer)
{
EnsureChildControls();
RenderChildren(writer);
}
protected override void CreateChildControls()
{
// Create a ChartSeries and assign its name and chart type
ChartSeries chartSeries = new ChartSeries();
chartSeries.Name = "Sales";
chartSeries.Type = ChartSeriesType.Bar;
// add new items to the series,
// passing a value and a label string
chartSeries.AddItem(120, "Internet");
chartSeries.AddItem(140, "Retail");
chartSeries.AddItem(35, "Wholesale");
radChart.Series.Add(chartSeries);
radChart.RadControlsDir = "~/_wpresources/RadControls";
this.Controls.Add(radChart);
}
}
I have the trial version (zip) of your controls.
Please help.
Thanks,
Sudha.M