IG UltraChart in Open Architect 10.2A

Posted by Admin on 24-Apr-2009 05:43

Hi,

I'm trying to get an IG UltraChart to run but I'm having a problem with populating my dataset.

The code example I have is in C# and uses the "typeof" method to determine a data type, see below:

private DataTable GetColumnData()

{      DataTable mydata = new DataTable();

// Define the columns and their names

mydata.Columns.Add("Series Labels", typeof(string));

mydata.Columns.Add("Column A", typeof(int));

mydata.Columns.Add("Column B", typeof(int));

mydata.Columns.Add("Column C", typeof(int));

mydata.Columns.Add("Column D", typeof(int));

// Add the rows of data

mydata.Rows.Add(new Object[] {"Series A",1,4,10,4 });

mydata.Rows.Add(new Object[] {"Series B",3,6,4,5 });

mydata.Rows.Add(new Object[] {"Series C",5,8,6,7 });

mydata.Rows.Add(new Object[] {"Series D",7,10,7,7 });

return mydata; }

My question is, what is the correct syntax to use when developing in the Open Architect?

The class browser states that the second parameter of the "Add" method should be a System.Type?

I realise that every "object" has a GetType() method but I'm unsure as to how get a string type for example.

Any help would be greatly appreciated

All Replies

Posted by Admin on 24-Apr-2009 05:52

BoltonBiker schrieb:

The class browser states that the second parameter of the "Add" method should be a System.Type?

I realise that every "object" has a GetType() method but I'm unsure as to how get a string type for example.

Check the Progress.Util.TypeHelper object from the GUI for .NET programming reference (http://communities.progress.com/pcom/docs/DOC-16315),

That's the proper way to receive a System.Type in the ABL.

Progress.Util.TypeHelper:GetType("System.Type") .

Posted by Admin on 24-Apr-2009 06:00

That's great! Thanks a lot.

This thread is closed