43:
How do I add Start/End columns

// HostEvent event - Notifies the application once the host fires an event.
void onEvent_HostEvent(int   _EventID)
{
	;
	print( exg2host1.HostEventParam(-2) );
}

public void init()
{
	COM com_Bar,com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_G2antt,com_Items;
	anytype var_Bar,var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_G2antt,var_Items;
	;

	super();

	exg2host1.HostReadOnly(255/*exHostReadWrite | exHostAllowAddEmptyItem*/);
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.SingleSel(false);
		com_G2antt.OnResizeControl(1/*exResizeChart*/);
		com_G2antt.ScrollBars(2058/*0x80a | exDisableNoVertical*/);
		var_Columns = COM::createFromObject(com_G2antt.Columns()); com_Columns = var_Columns;
		var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column;
			com_Column.AllowSizing(false);
			com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1));
			var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor;
			com_Editor.EditType(7/*DateType*/);
		var_Columns = COM::createFromObject(com_G2antt.Columns()); com_Columns = var_Columns;
		var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1;
			com_Column1.AllowSizing(false);
			com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2));
			var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor;
			com_Editor.EditType(7/*DateType*/);
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AllowCellValueToItemBar(true);
		var_Chart = com_G2antt.Chart(); com_Chart = var_Chart;
			com_Chart.AllowCreateBar(1/*exCreateBarAuto*/);
	/*should be called during the form's activate method*/ 		com_Chart.PaneWidth(false,256);
			var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar;
			com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
42:
How do I hide the left/items/columns part of the control

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar,com_Chart,com_G2antt;
	anytype var_Bar,var_Chart,var_G2antt;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.Pattern(1/*exPatternSolid*/);
		com_Bar.Color(WinApi::RGB2int(0,0,255));
		com_Bar.Def(19/*exBarTransparent*/,COMVariant::createFromInt(50));
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.HostReadOnly(255/*exHostReadWrite | exHostAllowAddEmptyItem*/);
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.OnResizeControl(129/*exDisableSplitter | exResizeChart*/);
		var_Chart = com_G2antt.Chart(); com_Chart = var_Chart;
			com_Chart.ColumnsFormatLevel("1");
	/*should be called during the form's activate method*/ 		com_Chart.PaneWidth(false,0);
			com_Chart.ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
41:
How do I hide the right/chart/tasks part of the control

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar,com_Chart,com_G2antt;
	anytype var_Bar,var_Chart,var_G2antt;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.Pattern(1/*exPatternSolid*/);
		com_Bar.Color(WinApi::RGB2int(0,0,255));
		com_Bar.Def(19/*exBarTransparent*/,COMVariant::createFromInt(50));
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		var_Chart = com_G2antt.Chart(); com_Chart = var_Chart;
	/*should be called during the form's activate method*/ 		com_Chart.PaneWidth(true,0);
			com_Chart.OverviewVisible(0/*exOverviewHidden*/);
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
40:
How do hide the top/overview part of the control

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Chart,com_G2antt;
	anytype var_Chart,var_G2antt;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataField(7/*exTasksDataSource*/,exg2host1.DataField(0/*exItemsDataSource*/));
	exg2host1.DataField(9/*exTasksStart*/,"BirthDate");
	exg2host1.DataField(10/*exTasksEnd*/,"HireDate");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		var_Chart = com_G2antt.Chart(); com_Chart = var_Chart;
			com_Chart.OverviewVisible(0/*exOverviewHidden*/);
	/*should be called during the form's activate method*/ 		com_Chart.PaneWidth(false,256);
			com_Chart.ScrollTo(str2Date("4/27/1969",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
39:
How do I resize the panels

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Appearance,com_Bar,com_Chart,com_G2antt;
	anytype var_Appearance,var_Bar,var_Chart,var_G2antt;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		var_Appearance = COM::createFromObject(com_G2antt.VisualAppearance()); com_Appearance = var_Appearance;
		com_Appearance.Add(1,"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn");
		var_Chart = COM::createFromObject(com_G2antt.Chart()); com_Chart = var_Chart;
		var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar;
			com_Bar.Height(15);
			com_Bar.Color(0x1ff0000);
			com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
			com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	var_Chart = exg2host1.Host().Chart(); com_Chart = var_Chart;
	/*should be called during the form's activate method*/ 	com_Chart.PaneWidth(false,128);
		com_Chart.ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
38:
How do I lock the first column

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_G2antt;
	anytype var_G2antt;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.CountLockedColumns(1);
		com_G2antt.BackColorLock(com_G2antt.BackColorAlternate());
}
37:
How do I specify a different color for the tasks ( EBN color )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Appearance,com_Bar,com_Chart,com_G2antt;
	anytype var_Appearance,var_Bar,var_Chart,var_G2antt;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		var_Appearance = COM::createFromObject(com_G2antt.VisualAppearance()); com_Appearance = var_Appearance;
		com_Appearance.Add(1,"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn");
		var_Chart = COM::createFromObject(com_G2antt.Chart()); com_Chart = var_Chart;
		var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar;
			com_Bar.Height(15);
			com_Bar.Color(0x1ff0000);
			com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
			com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	/*should be called during the form's activate method*/ exg2host1.Host().Chart().PaneWidth(false,256);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
36:
How do I specify a different color for the tasks ( solid color, transparent )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.Pattern(1/*exPatternSolid*/);
		com_Bar.Color(WinApi::RGB2int(0,0,255));
		com_Bar.Def(19/*exBarTransparent*/,COMVariant::createFromInt(50));
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataField(12/*exTasksColor*/,"Color");
	exg2host1.DataField(13/*exTasksCaption*/,"TaskName");
	exg2host1.Host().Items().ExpandItem(0,true);
	/*should be called during the form's activate method*/ exg2host1.Host().Chart().PaneWidth(false,256);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
35:
GroupBy

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar,com_Chart,com_Column,com_Column1,com_G2antt,com_Items;
	anytype var_Bar,var_Chart,var_Column,var_Column1,var_G2antt,var_Items;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.AllowGroupBy(true);
		com_G2antt.SortBarVisible(true);
		com_G2antt.BackColorSortBar(exg2host1.Host().BackColor());
		com_G2antt.BackColorSortBarCaption(com_G2antt.BackColorSortBar());
		com_G2antt.SortBarCaption("<sha ;;0><fgcolor=FF0000>Drag a <b>column</b> header here to sort by that column.");
		var_Chart = COM::createFromObject(com_G2antt.Chart()); com_Chart = var_Chart;
		var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar;
			com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
			com_Bar.OverlaidGroup("Task,Progress");
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.ExpandItem(0,true);
		com_G2antt.CountLockedColumns(1);
		com_G2antt.BackColorLock(com_G2antt.BackColorAlternate());
		var_Column = COM::createFromObject(com_G2antt.Columns()).Item("EmployeeID"); com_Column = var_Column;
			com_Column.AllowGroupBy(false);
			com_Column.Def(7/*exHeaderBackColor*/,exg2host1.Host().BackColorAlternate());
		var_Column1 = COM::createFromObject(com_G2antt.Columns()).Item("Title"); com_Column1 = var_Column1;
		com_Column1.SortOrder(1/*SortAscending*/);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
34:
How can I hide a column
// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Column;
	anytype var_Column;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	var_Column = COM::createFromObject(exg2host1.Host().Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column;
	com_Column.Visible(false);
}
33:
Can row errors being highligted until the user correct them, not to clear them as soon a change occurs

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.HostDef(7/*exErrorClearOnChange*/,COMVariant::createFromBoolean(false));
}
32:
No error is highligthed

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
}
31:
I've noticed that rows with errors are shown in red. Is it possible to change the colors

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.HostDef(6/*exErrorBackColor*/,COMVariant::createFromInt(0));
	exg2host1.HostDef(5/*exErrorForeColor*/,COMVariant::createFromInt(16777215));
}
30:
Is it possible to rename the (New) to something else

public void init()
{
	COM com_G2antt,com_Items;
	anytype var_G2antt,var_Items;
	;

	super();

	exg2host1.HostDef(1/*exNew*/,"*");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.BeginUpdate();
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("A");
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("B");
		com_G2antt.EndUpdate();
	exg2host1.Refresh();
}
29:
How can I hide the (New) item (sample 2)

public void init()
{
	COM com_G2antt,com_Items;
	anytype var_G2antt,var_Items;
	;

	super();

	exg2host1.HostReadOnly(240/*exHostAllowUpdate | exHostAllowDelete*/);
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.BeginUpdate();
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("A");
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("B");
		com_G2antt.EndUpdate();
}
28:
How can I hide the (New) item (sample 1)

public void init()
{
	COM com_G2antt,com_Items;
	anytype var_G2antt,var_Items;
	;

	super();

	exg2host1.HostDef(1/*exNew*/,"");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.BeginUpdate();
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("A");
		var_Items = COM::createFromObject(com_G2antt.Items()); com_Items = var_Items;
		com_Items.AddItem("B");
		com_G2antt.EndUpdate();
	exg2host1.Refresh();
}
27:
Read-Only

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.HostReadOnly(0/*exHostReadOnly*/);
}
26:
How can I prevent user create new /delete tasks ( only move or resize then )
// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.HostReadOnly(128/*exHostAllowUpdate*/);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
25:
How do I get the row/item/task/link from the cursor

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

// HostEvent event - Notifies the application once the host fires an event.
void onEvent_HostEvent(int   _EventID)
{
	;
	print( exg2host1.HostContext().ToString() );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.HostReadOnly(141/*exHostAllowUpdate | exHostAllowAddNew*/);
}
24:
Disable Delete
// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.HostReadOnly(141/*exHostAllowUpdate | exHostAllowAddNew*/);
}
23:
Disable AddNew

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.HostReadOnly(240/*exHostAllowUpdate | exHostAllowDelete*/);
}
22:
ACCDB sample ( file )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
21:
MDB sample ( file )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.mdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
20:
DBF sample ( file )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.dbf");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
}
19:
DAO sample ( object, DAO.DBEngine.120, multiple tasks, multiple tables )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar,com_Database,com_PrivDBEngine,com_rsEmployees,com_rsLinks,com_rsTasks;
	anytype rsEmployees,rsLinks,rsTasks,var_Bar,var_Database,var_PrivDBEngine;
	;

	super();

	// Add 'Microsoft Office 12.0 Access database engine Object Library(ACEDAO.DLL)' reference to your project.
	var_PrivDBEngine = COM::createFromObject(new DAO.PrivDBEngine()); com_PrivDBEngine = var_PrivDBEngine;
		var_Database = com_PrivDBEngine.OpenDatabase("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); com_Database = var_Database;
			rsEmployees = com_Database.OpenRecordset("Employees"); com_rsEmployees = rsEmployees;
			rsTasks = com_Database.OpenRecordset("EmployeeDetails"); com_rsTasks = rsTasks;
			rsLinks = com_Database.OpenRecordset("EmployeeLinks"); com_rsLinks = rsLinks;
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataSource("Tasks",COM::createFromVariant(rsTasks));
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataSource("Links",COM::createFromVariant(rsLinks));
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
18:
DAO sample ( file, multiple tasks, multiple tables )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	exg2host1.DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataTechnology("Tasks","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataTechnology("Links","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
17:
DAO sample ( object, DAO.DBEngine.120, single task, single table )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Database,com_PrivDBEngine,com_rsEmployees,com_rsLinks;
	anytype rsEmployees,rsLinks,var_Database,var_PrivDBEngine;
	;

	super();

	// Add 'Microsoft Office 12.0 Access database engine Object Library(ACEDAO.DLL)' reference to your project.
	var_PrivDBEngine = COM::createFromObject(new DAO.PrivDBEngine()); com_PrivDBEngine = var_PrivDBEngine;
		var_Database = com_PrivDBEngine.OpenDatabase("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); com_Database = var_Database;
			rsEmployees = com_Database.OpenRecordset("Employees"); com_rsEmployees = rsEmployees;
			rsLinks = com_Database.OpenRecordset("EmployeeLinks"); com_rsLinks = rsLinks;
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataField(7/*exTasksDataSource*/,exg2host1.DataField(0/*exItemsDataSource*/));
	exg2host1.DataField(9/*exTasksStart*/,"BirthDate");
	exg2host1.DataField(10/*exTasksEnd*/,"HireDate");
	exg2host1.DataSource("Links",COM::createFromVariant(rsLinks));
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
}
16:
DAO sample ( file, single task, single table )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataField(7/*exTasksDataSource*/,exg2host1.DataField(0/*exItemsDataSource*/));
	exg2host1.DataField(9/*exTasksStart*/,"BirthDate");
	exg2host1.DataField(10/*exTasksEnd*/,"HireDate");
	exg2host1.DataTechnology("Links","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
}
15:
DAO sample ( tree recordset )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
}
14:
DAO sample ( flat recordset )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Database,com_PrivDBEngine,com_rsEmployees;
	anytype rsEmployees,var_Database,var_PrivDBEngine;
	;

	super();

	// Add 'Microsoft Office 12.0 Access database engine Object Library(ACEDAO.DLL)' reference to your project.
	var_PrivDBEngine = COM::createFromObject(new DAO.PrivDBEngine()); com_PrivDBEngine = var_PrivDBEngine;
		var_Database = com_PrivDBEngine.OpenDatabase("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); com_Database = var_Database;
			rsEmployees = com_Database.OpenRecordset("Employees"); com_rsEmployees = rsEmployees;
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
}
13:
DAO sample ( flat )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
}
12:
ADO sample ( object, ADODB.Recordset, multiple tasks )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar,com_rsEmployees,com_rsLinks,com_rsTasks;
	anytype rsEmployees,rsLinks,rsTasks,var_Bar;
	;

	super();

	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rsEmployees = COM::createFromObject(new ADODB.Recordset()); com_rsEmployees = rsEmployees;
	rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	rsTasks = COM::createFromObject(new ADODB.Recordset()); com_rsTasks = rsTasks;
	rsTasks.Open("EmployeeDetails","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Tasks",COM::createFromVariant(rstasks));
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	rsLinks = COM::createFromObject(new ADODB.Recordset()); com_rsLinks = rsLinks;
	rsLinks.Open("EmployeeLinks","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Links",COM::createFromVariant(rsLinks));
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
11:
ADO sample ( file, multiple tasks, multiple tables )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_Bar;
	anytype var_Bar;
	;

	super();

	exg2host1.DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataTechnology("Tasks","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Tasks",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Tasks","EmployeeDetails");
	exg2host1.DataField(7/*exTasksDataSource*/,"Tasks");
	exg2host1.DataField(8/*exTasksItemID*/,"EmployeeID");
	exg2host1.DataField(9/*exTasksStart*/,"DateStart");
	exg2host1.DataField(10/*exTasksEnd*/,"DateEnd");
	exg2host1.DataField(14/*exTasksID*/,"TaskID");
	exg2host1.DataTechnology("Links","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_Bar = COM::createFromObject(exg2host1.Host().Chart().Bars()).Item("Task"); com_Bar = var_Bar;
		com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/);
		com_Bar.OverlaidGroup("Task,Progress");
	exg2host1.Host().Items().ExpandItem(0,true);
	exg2host1.Host().Chart().ScrollTo(str2Date("5/27/2017",213),COMVariant::createFromInt(1));
}
10:
ADO sample ( object, ADODB.Recordset, single task, single table )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_rsEmployees,com_rsLinks;
	anytype rsEmployees,rsLinks;
	;

	super();

	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rsEmployees = COM::createFromObject(new ADODB.Recordset()); com_rsEmployees = rsEmployees;
	rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataField(7/*exTasksDataSource*/,exg2host1.DataField(0/*exItemsDataSource*/));
	exg2host1.DataField(9/*exTasksStart*/,"BirthDate");
	exg2host1.DataField(10/*exTasksEnd*/,"HireDate");
	rsLinks = COM::createFromObject(new ADODB.Recordset()); com_rsLinks = rsLinks;
	rsLinks.Open("EmployeeLinks","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Links",COM::createFromVariant(rsLinks));
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
}
9:
ADO sample ( file, single task, single table )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
	exg2host1.DataField(7/*exTasksDataSource*/,exg2host1.DataField(0/*exItemsDataSource*/));
	exg2host1.DataField(9/*exTasksStart*/,"BirthDate");
	exg2host1.DataField(10/*exTasksEnd*/,"HireDate");
	exg2host1.DataTechnology("Links","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Links",exg2host1.DataSource("Items"));
	exg2host1.DataMember("Links","EmployeeLinks");
	exg2host1.DataField(15/*exLinksDataSource*/,"Links");
	exg2host1.DataField(16/*exLinksStart*/,"Start");
	exg2host1.DataField(17/*exLinksEnd*/,"End");
}
8:
ADO sample ( tree recordset )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	exg2host1.DataField(1/*exItemsID*/,"EmployeeID");
	exg2host1.DataField(2/*exItemsParentID*/,"ReportsTo");
}
7:
ADO sample ( flat recordset )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_rsEmployees;
	anytype rsEmployees;
	;

	super();

	// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
	rsEmployees = COM::createFromObject(new ADODB.Recordset()); com_rsEmployees = rsEmployees;
	rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/);
	exg2host1.DataSource("Items",COM::createFromVariant(rsEmployees));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
}
6:
ADO sample ( flat table )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	;

	super();

	exg2host1.DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
	exg2host1.DataMember("Items","Employees");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
}
5:
XML sample ( object, MSXML.DOMDocument )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_G2antt,com_xml;
	anytype var_G2antt,xml;
	;

	super();

	// Add 'Microsoft XML, v3.0(msxml3.dll)' reference to your project.
	xml = COM::createFromObject(new MSXML2.FreeThreadedDOMDocument30()); com_xml = xml;
	xml.async(false);
	xml.load("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.xml");
	exg2host1.DataSource("Items",COM::createFromVariant(xml));
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.LinesAtRoot(-1/*exLinesAtRoot*/);
		com_G2antt.SingleSel(false);
		com_G2antt.AutoDrag(3/*exAutoDragPositionAny*/);
}
4:
XML sample ( file tree )

// Error event - Fired when an internal error occurs.
void onEvent_Error(int   _Error,str   _Description)
{
	;
	print( _Error );
	print( _Description );
}

public void init()
{
	COM com_G2antt;
	anytype var_G2antt;
	;

	super();

	exg2host1.DataTechnology("Items","MSXML.DOMDocument");
	exg2host1.DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.xml");
	exg2host1.DataField(0/*exItemsDataSource*/,"Items");
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.LinesAtRoot(-1/*exLinesAtRoot*/);
		com_G2antt.SingleSel(false);
		com_G2antt.AutoDrag(3/*exAutoDragPositionAny*/);
}
3:
How can I let user create new items/bars when clicking the empty area of the control
// HostEvent event - Notifies the application once the host fires an event.
void onEvent_HostEvent(int   _EventID)
{
	;
	print( exg2host1.HostEventParam(-2) );
}

public void init()
{
	COM com_Chart,com_G2antt;
	anytype var_Chart,var_G2antt;
	;

	super();

	exg2host1.HostReadOnly(255/*exHostReadWrite | exHostAllowAddEmptyItem*/);
	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.ScrollBars(2058/*0x80a | exDisableNoVertical*/);
		var_Chart = com_G2antt.Chart(); com_Chart = var_Chart;
	/*should be called during the form's activate method*/ 		com_Chart.PaneWidth(false,128);
			com_Chart.AllowCreateBar(1/*exCreateBarAuto*/);
}

/*
public void activate(boolean _active)
{
	;

	super(_active);

}
*/
2:
How do I handle events of the host

// HostEvent event - Notifies the application once the host fires an event.
void onEvent_HostEvent(int   _EventID)
{
	;
	print( exg2host1.HostEventParam(-2) );
}

public void init()
{
	COM com_Columns,com_G2antt;
	anytype var_Columns,var_G2antt;
	;

	super();

	// Add 'ExG2antt 1.0 Control Library(exg2antt.dll)' reference to your project.
	var_G2antt = exg2host1.Host(); com_G2antt = var_G2antt;
		com_G2antt.BeginUpdate();
		var_Columns = COM::createFromObject(com_G2antt.Columns()); com_Columns = var_Columns;
		com_Columns.Add("new column");
		com_G2antt.EndUpdate();
}
1:
How can I get the version of the host/exg2antt control

public void init()
{
	;

	super();

	print( exg2host1.Version() );
	print( "Host" );
	print( exg2host1.Host().Version() );
}