H2 enable data entries from editor.data?

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
BerntR
Newbie
Newbie
Posts: 32
Joined: Mon Jul 17, 2006 12:00 am

H2 enable data entries from editor.data?

Post by BerntR » Fri Aug 04, 2006 12:03 pm

I need to enable data edition and data entries from the chart editor.data tab page.

But in runtime and in design time, all entries and editions are ignored. How do I enable data entries?

The subject series is a line series.

Thanks,

stark
Newbie
Newbie
Posts: 10
Joined: Wed Jul 26, 2006 12:00 am
Location: Girona / Catalunya

Post by stark » Mon Aug 07, 2006 10:04 am

Hello BerntR,

you can change the data entries using the following code:

Code: Select all

 area.Chart[ChartIndex].YValues[YIndex] = 56;
 area.Chart[ChartIndex].YValues[XIndex] = 6;
Best regards
Alex

Steema Crew

BerntR
Newbie
Newbie
Posts: 32
Joined: Mon Jul 17, 2006 12:00 am

Post by BerntR » Mon Aug 07, 2006 10:08 am

I know, and I use that function a lot.

But how do I write data from the editor.data to the chart series?


I want to enable the user to editor. data in the datatable of the editor. But right now the data entered here is ignored rather than saved.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Aug 07, 2006 1:28 pm

Hello,

Have you seen the example in the features demo under:
Welcome !\New in Components\Chart Grid ?

I think this demo should help you solve your problem.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Aug 07, 2006 2:39 pm

Hi Bernt,

which TeeChart for Net version are you using ? I've just test it here with the TeeChart for Net v2 and I'm able to modify the data from the Data tab in the Editor and it's also saved.

BerntR
Newbie
Newbie
Posts: 32
Joined: Mon Jul 17, 2006 12:00 am

Post by BerntR » Mon Aug 07, 2006 3:45 pm

So it should work by itself?

Anyway, the version number is : 2.0.2306.26232

I recently installed it. Maybe it has something to do with shifting from testversion and Teechart Lite to Teechart Pro.

Think I will check with a new C# project and see if it works there.

Edit: Already chacked. Same result. It doesn't work.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Aug 08, 2006 6:32 am

Hello,

Using the features demo shipped with teechart, can you please confirm that the example under:

Welcome !\New in Components\Chart Grid ?

Works ok for you?
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

BerntR
Newbie
Newbie
Posts: 32
Joined: Mon Jul 17, 2006 12:00 am

Post by BerntR » Tue Aug 08, 2006 11:30 am

Chris wrote:Hello,

Using the features demo shipped with teechart, can you please confirm that the example under:

Welcome !\New in Components\Chart Grid ?

Works ok for you?
It doesn't work.

The chart doesn't respond to data entry in the grid.

Whenever I press the button, all values are reset.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Aug 08, 2006 1:50 pm

Hello,

Very strange, as it seems the DataGrid.DataBinding is now failing to update the DataSet correctly. You can work around this, however, by doing the following (corrections to the example in the features demo):

Code: Select all

public Form1()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			bar1.Add(32, "John");
			bar1.Add(417, "Anne");
			bar1.Add(65, "Louise");
			bar1.Add(87, "Jeff");
	
			
			dataGrid1.DataBindings.Clear();
			DataSet data = bar1.DataSource as DataSet; 
			data.DataSetName = "MyDataSet";
			dataGrid1.SetDataBinding(data, "TeeDataTable");

		}
and:

Code: Select all

		private void dataGrid1_CurrentCellChanged(object sender, System.EventArgs e)
		{
			DataSet data = dataGrid1.DataSource as DataSet;
			bar1.DataSource = null;
			bar1.DataSource = data;
		}
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

BerntR
Newbie
Newbie
Posts: 32
Joined: Mon Jul 17, 2006 12:00 am

Post by BerntR » Tue Aug 08, 2006 3:36 pm

Chris wrote:Hello,

Very strange, as it seems the DataGrid.DataBinding is now failing to update the DataSet correctly.
What are you saying. Are you experiencing the same problem?

Regarding a work-around: How do I access & control the datagrid that resides inside the teechart editor?

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Tue Aug 08, 2006 5:24 pm

Hello,

I'm experiencing the same problem in the demo I referred to. The DataGrid within the chart editor itself has always only been readonly in TeeChart for .NET version 2; it will be read/write in version 3, due out in the fourth quarter of this year.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

BerntR
Newbie
Newbie
Posts: 32
Joined: Mon Jul 17, 2006 12:00 am

Post by BerntR » Tue Aug 08, 2006 11:04 pm

Chris wrote:Hello,

I'm experiencing the same problem in the demo I referred to. The DataGrid within the chart editor itself has always only been readonly in TeeChart for .NET version 2; it will be read/write in version 3, due out in the fourth quarter of this year.
That's good enough for me.

Thanks for helping me sorting this out. :)

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Wed Aug 09, 2006 7:14 am

Hello,

I'm afraid I was wrong when I said that the DataGrid of the Chart Editor's Data tab has always been read only at runtime. I'm sorry. The DataGrid of the Chart Editor's Data tab should be able to edit series values at runtime, but not at designtime, and so I have fixed the code so that it will work in the next maintenance release of version 2 due out at the beginning of September.

The DataGrid of the Chart Editor's Data tab will be able to edit values at design time in version 3.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply