7 Answers, 1 is accepted
Unfortunately the Silverlight version of the chart control does not have built-in support for DataTable and it would not be possible to achieve the desired effect at the moment.
Greetings,
Freddie
the Telerik team
Thanks for the reply.
Is there any way I can do this using the Telerik controls?
Or have any estimate of when it might be done?
This functionality is very important to me, I need to insert a table of data for the chart.
Thanks ...
You can place RadGridView under the RadChart instance and export them together like this:
XAML
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
StackPanel
>
<
Button
Height
=
"20"
Content
=
"Export"
Click
=
"Button_Click"
/>
<
StackPanel
x:Name
=
"PanelWrapper"
>
<
telerik:RadChart
x:Name
=
"RadChart1"
/>
<
telerik:RadGridView
x:Name
=
"RadGridView1"
/>
</
StackPanel
>
</
StackPanel
>
</
Grid
>
C#
public
MainPage()
{
InitializeComponent();
RadChart1.ItemsSource =
new
int
[] { 1, 2, 3 };
RadGridView1.ItemsSource =
new
int
[] { 1, 2, 3 };
}
private
void
Button_Click(
object
sender, RoutedEventArgs e)
{
SaveFileDialog sfd =
new
SaveFileDialog();
if
(sfd.ShowDialog() ==
true
)
{
using
(Stream stream = sfd.OpenFile())
{
Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(PanelWrapper, stream,
new
Telerik.Windows.Media.Imaging.
PngBitmapEncoder());
}
}
}
}
Greetings,
Freddie
the Telerik team
I am having problems adding both a RadChart and a RadGridView to the same XAML page. I have tried the simple example below, but I receive the following error message...
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)
Timestamp: Mon, 14 Mar 2011 13:29:25 UTC
Message: Unhandled Error in Silverlight Application [Parser_CreateInstance_ConstructorInvocation]
Arguments: Telerik.Windows.Controls.RadGridView
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.51204.0&File=System.Windows.dll&Key=Parser_CreateInstance_ConstructorInvocation [Line: 14 Position: 45] at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at ERP.SLF.RollingBacklog.MainPage.InitializeComponent()
at ERP.SLF.RollingBacklog.MainPage..ctor()
at ERP.SLF.RollingBacklog.App.Application_Startup(Object sender, StartupEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
Line: 1
Char: 1
Code: 0
URI: http://Dashboard/Pages/FinanceDashboard.aspx
Are you able to tell me what I am missing?
Thanks,
Amy
We are unaware of any problems in scenarios integrating RadChart and RadGridView controls (you can check one such example here).
Make sure you are referencing all necessary assemblies in your application -- the control dependencies are listed here:
- Telerik.Windows.Controls.dll
- Telerik.Windows.Data.dll
- Telerik.Windows.Controls.Input.dll
- Telerik.Windows.Controls.Charting.dll
- Telerik.Windows.Controls.GridView.dll
Hope this helps.
All the best,
Giuseppe
the Telerik team
Thanks again,
Amy