Page 1 of 1

H2 enable data entries from editor.data?

Posted: Fri Aug 04, 2006 12:03 pm
by 9641906
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,

Posted: Mon Aug 07, 2006 10:04 am
by 9531990
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;

Posted: Mon Aug 07, 2006 10:08 am
by 9641906
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.

Posted: Mon Aug 07, 2006 1:28 pm
by narcis
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.

Posted: Mon Aug 07, 2006 2:39 pm
by Pep
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.

Posted: Mon Aug 07, 2006 3:45 pm
by 9641906
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.

Posted: Tue Aug 08, 2006 6:32 am
by Chris
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?

Posted: Tue Aug 08, 2006 11:30 am
by 9641906
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.

Posted: Tue Aug 08, 2006 1:50 pm
by Chris
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;
		}

Posted: Tue Aug 08, 2006 3:36 pm
by 9641906
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?

Posted: Tue Aug 08, 2006 5:24 pm
by Chris
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.

Posted: Tue Aug 08, 2006 11:04 pm
by 9641906
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. :)

Posted: Wed Aug 09, 2006 7:14 am
by Chris
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.