Development environment: C#, TeeChart Pro for Visual Studio .NET v1
Problem description: Many information must be displayed in the title of teechart. So we want to put a datagrid control on the teechart to show all the information friendly. When printing, the datagrid must be printed together with the teechart.
Question:Is there any solution to implement this feature?
Add a datagrid control on the teechart or other solution is acceptable.
how to add a datagrid control on the teechart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi am,
This feature is not available in TeeChart for .NET v1. However, it's available in TeeChart for .NET v2 using a standard System.Windows.Forms.DataGrid and this code:
To print the DataGrid you may use any of the solutions below:
http://xmlfox.com/print_datagrid_net.htm
http://www.c-sharpcorner.com/Graphics/D ... nterMG.asp
http://www.knowdotnet.com/articles/printgriddemo.html
This feature is not available in TeeChart for .NET v1. However, it's available in TeeChart for .NET v2 using a standard System.Windows.Forms.DataGrid and this code:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e)
{
bar1.FillSampleValues();
dataGrid1.DataBindings.Clear();
dataGrid1.SetDataBinding(bar1.DataSource, "TeeDataTable");
}
private void dragPoint1_Drag(Steema.TeeChart.Tools.DragPoint sender, int index)
{
bar1.WriteToDataSource();
dataGrid1.SetDataBinding(bar1.DataSource, "TeeDataTable");
dataGrid1.Update();
}
private void dataGrid1_CurrentCellChanged(object sender, System.EventArgs e)
{
bar1.CheckDataSource();
}
private void button1_Click(object sender, System.EventArgs e)
{
tChart1.Printer.Print();
}
http://xmlfox.com/print_datagrid_net.htm
http://www.c-sharpcorner.com/Graphics/D ... nterMG.asp
http://www.knowdotnet.com/articles/printgriddemo.html
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |