Page 1 of 1

Cannot found column -1 exception on TeeChart v2

Posted: Mon May 19, 2008 3:07 pm
by 9638253
Hello !

I have an exception on a CheckDataSource method. I've made a Gantt chart bound with a DataSet. The following code works on TeeChart V3 Evaluation, but I had to work with the TeeChart V2. I installed the Update Build Version "TeeChartNET2UpdateBuild.exe", but the problem is still there.

There is my code in C# :

Code: Select all


private Steema.TeeChart.Styles.Gantt gantt1;
DataSetTest m_dt_Test = new DataSetTest();

// Binding
gantt1.DataSource = m_dt_Test.T_TASKS;
gantt1.EndValues.DataMember = "END";
gantt1.EndValues.DateTime = true;
gantt1.LabelMember = "NOM";
gantt1.StartValues.DataMember = "START";
gantt1.StartValues.DateTime = true;
gantt1.YValues.DataMember = "Y";
gantt1.ColorMember = "COLOR";
gantt1.XValues.DateTime = true;

string[] listPost = new string[4];
listPost[0] = "P1";
listPost[1] = "P2";
listPost[2] = "P3";
listPost[3] = "P5";

// Initialize the left axe
for (int key = 0; key < listPost.Length; ++key)
{
        gantt1.Chart.Axes.Left.Labels.Items.Add(key, listPost[key]);
}

gantt1.Chart.Axes.Bottom.SetMinMax(DateTime.Now, DateTime.Now.AddDays(15));

gantt1.CheckDataSource(); // no problem, there is no data

m_dt_Test.T_TASKS.Rows.Clear();

DataSetTest.T_TASKSRow TaskRow = m_dt_Test.T_TASKS.NewT_TASKSRow();
TaskRow.COLOR = Color.Blue;
TaskRow.END = DateTime.Now.AddDays(4);
TaskRow.ID_TASK = 10;
TaskRow.NOM = "NAME";
TaskRow.NUM_GROUPE = 10;
TaskRow.START = DateTime.Now;
TaskRow.Y = 1;

m_dt_Test.T_TASKS.AddT_TASKSRow(TaskRow);
gantt1.CheckDataSource(); // there is the exception
The exception message is "Cannot found column -1". I have this problem on TeeChart V2 but not on TeeChart V3.

Thanks for any help.

Posted: Mon May 19, 2008 3:11 pm
by narcis
Hi Max,

It would be very helpful if you could arrange a simple example project we can run "as-is" to reproduce the problem here. A test datasource could be easily created as in the example Christopher Ireland posted here.

You can either post your files at news:/www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Posted: Wed May 21, 2008 8:45 am
by narcis
Hi Max,

Thanks for the example project.

I could reproduce the issue here and added it (TF02013057) to our bug list to be fixed for future releases.