50
How do I get the start/end of the bar once the BarResize/BarResizing event occurs

// HostEvent event - Notifies the application once the host fires an event.
void __fastcall TForm1::G2Host1HostEvent(TObject *Sender,Exg2hostlib_tlb::HostEventEnum   EventID)
{
	TVariant h = TVariant(G2Host1->HostEventParam[0]);
	TVariant key = TVariant(G2Host1->HostEventParam[1]);
	OutputDebugString( PChar(G2Host1->HostEventParam[-2]) );
	OutputDebugString( L"Start:" );
	OutputDebugString( PChar(G2Host1->Host->Items->get_ItemBar(h,TVariant(key),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarStart)) );
	OutputDebugString( PChar(G2Host1->HostEventParam[-2]) );
	OutputDebugString( L"End:" );
	OutputDebugString( PChar(G2Host1->Host->Items->get_ItemBar(h,TVariant(key),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarEnd)) );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IChartPtr var_Chart = (IDispatch*)G2Host1->Host->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->set_FirstVisibleDate(TVariant(TDateTime(2019,3,30).operator double()));
Exg2anttlib_tlb::IItemsPtr var_Items = (IDispatch*)G2Host1->Host->Items;
	var_Items->AddBar(var_Items->AddItem(TVariant("Task")),TVariant("Task"),TVariant(TDateTime(2019,4,1).operator double()),TVariant(TDateTime(2019,4,14).operator double()),TNoParam(),TNoParam());

49
How do I get the bar/task from the cursor
// HostEvent event - Notifies the application once the host fires an event.
void __fastcall TForm1::G2Host1HostEvent(TObject *Sender,Exg2hostlib_tlb::HostEventEnum   EventID)
{
	OutputDebugString( L"Event:" );
	OutputDebugString( PChar(G2Host1->HostEventParam[-2]) );
	/*
		Select the Component\Import Component...\Import a Type Library,
		to import the following Type Library:
			ExG2antt 1.0 Control Library
		TypeLib: ExG2antt.dll
		to define the namespace: Exg2anttlib_tlb
	*/
	//#include "EXG2ANTTLIB_TLB.h"
	Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
		long i = var_G2antt->get_ItemFromPoint(-1,-1,c,h);
		OutputDebugString( L"Cell:" );
		OutputDebugString( var_G2antt->Items->get_CellCaption(TVariant(i),TVariant(c)) );
		Exg2anttlib_tlb::IChartPtr var_Chart = var_G2antt->Chart;
			TVariant b = TVariant(var_Chart->get_BarFromPoint(-1,1));
			OutputDebugString( L"Bar:" );
			OutputDebugString( PChar(G2Host1(IDispatch*)->Host->Items->get_ItemBar(i,TVariant(b),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarName)) );
}


48
How do I get the cell from the cursor

// HostEvent event - Notifies the application once the host fires an event.
void __fastcall TForm1::G2Host1HostEvent(TObject *Sender,Exg2hostlib_tlb::HostEventEnum   EventID)
{
	OutputDebugString( L"Event:" );
	OutputDebugString( PChar(G2Host1->HostEventParam[-2]) );
	/*
		Select the Component\Import Component...\Import a Type Library,
		to import the following Type Library:
			ExG2antt 1.0 Control Library
		TypeLib: ExG2antt.dll
		to define the namespace: Exg2anttlib_tlb
	*/
	//#include "EXG2ANTTLIB_TLB.h"
	Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
		long i = var_G2antt->get_ItemFromPoint(-1,-1,c,h);
		OutputDebugString( L"Cell:" );
		OutputDebugString( var_G2antt->Items->get_CellCaption(TVariant(i),TVariant(c)) );
}


47
How can I highlights cells based on its value

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksColor] = L"Color";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksCaption] = L"TaskName";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->BeginUpdate();
	var_G2antt->BackColorAlternate = RGB(0,0,0);
	Exg2anttlib_tlb::IColumnPtr var_Column = var_G2antt->Columns->get_Item(TVariant("Title"));
		var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellBackColor,TVariant(15790320));
		var_Column->Width = var_Column->AutoWidth;
	Exg2anttlib_tlb::IConditionalFormatsPtr var_ConditionalFormats = var_G2antt->ConditionalFormats;
		var_ConditionalFormats->Add(L"lower(%4) contains `manager`",TNoParam())->Bold = true;
		var_ConditionalFormats->Add(L"%3",TNoParam())->BackColor = RGB(240,240,240);
	var_G2antt->Items->set_ExpandItem(0,true);
	Exg2anttlib_tlb::IColumnPtr var_Column1 = var_G2antt->Columns->get_Item(TVariant("EmployeeID"));
		var_Column1->Width = var_Column1->AutoWidth;
	var_G2antt->EndUpdate();

46
How do I programatically hide a column

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksColor] = L"Color";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksCaption] = L"TaskName";
(IDispatch*)G2Host1->Host->Columns->get_Item(TVariant("LastName"))->Visible = false;

45
Is it possible to get the information from the control when we click on the bar/item

// HostEvent event - Notifies the application once the host fires an event.
void __fastcall TForm1::G2Host1HostEvent(TObject *Sender,Exg2hostlib_tlb::HostEventEnum   EventID)
{
	OutputDebugString( PChar(G2Host1->HostEventParam[-2]) );
	/*
		Select the Component\Import Component...\Import a Type Library,
		to import the following Type Library:
			ExG2antt 1.0 Control Library
		TypeLib: ExG2antt.dll
		to define the namespace: Exg2anttlib_tlb
	*/
	//#include "EXG2ANTTLIB_TLB.h"
	Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
		long i = var_G2antt->get_ItemFromPoint(-1,-1,c,hit);
		OutputDebugString( L"cell's value from cursor: " );
		OutputDebugString( PChar(var_G2antt->Items->get_CellValue(TVariant(i),TVariant(c))) );
		OutputDebugString( L"cell's value on col 1: " );
		OutputDebugString( PChar(var_G2antt->Items->get_CellValue(TVariant(i),TVariant(1))) );
		TVariant b = TVariant(var_G2antt->Chart->get_BarFromPoint(-1,-1));
		OutputDebugString( L"Bar:" );
		OutputDebugString( L"b" );
		OutputDebugString( L"Bar Start:" );
		OutputDebugString( PChar(var_G2antt->Items->get_ItemBar(i,TVariant(b),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarStart)) );
		OutputDebugString( L"Bar End:" );
		OutputDebugString( PChar(var_G2antt->Items->get_ItemBar(i,TVariant(b),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarEnd)) );
		OutputDebugString( L"Bar Caption:" );
		OutputDebugString( PChar(var_G2antt->Items->get_ItemBar(i,TVariant(b),Exg2anttlib_tlb::ItemBarPropertyEnum::exBarCaption)) );
}

Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->Debug = true;
	Exg2anttlib_tlb::IBarPtr var_Bar = var_G2antt->Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
		var_Bar->OverlaidGroup = L"Task,Progress";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksColor] = L"Color";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksCaption] = L"TaskName";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
Exg2anttlib_tlb::IChartPtr var_Chart = (IDispatch*)G2Host1->Host->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

44
How do I get the bar from the cursor

// HostEvent event - Notifies the application once the host fires an event.
void __fastcall TForm1::G2Host1HostEvent(TObject *Sender,Exg2hostlib_tlb::HostEventEnum   EventID)
{
	OutputDebugString( PChar(G2Host1->HostEventParam[-2]) );
	OutputDebugString( PChar(G2Host1->Host->Chart->get_BarFromPoint(-1,-1)) );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->VisualAppearance->Add(1,TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn"));
	Exg2anttlib_tlb::IBarPtr var_Bar = var_G2antt->Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->Height = 15;
		var_Bar->Color = 0x1ff0000;
		var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
		var_Bar->OverlaidGroup = L"Task,Progress";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksColor] = L"Color";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksCaption] = L"TaskName";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
Exg2anttlib_tlb::IChartPtr var_Chart = (IDispatch*)G2Host1->Host->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

43
How do I add Start/End columns

// HostEvent event - Notifies the application once the host fires an event.
void __fastcall TForm1::G2Host1HostEvent(TObject *Sender,Exg2hostlib_tlb::HostEventEnum   EventID)
{
	OutputDebugString( PChar(G2Host1->HostEventParam[-2]) );
}

G2Host1->HostReadOnly = Exg2hostlib_tlb::HostReadOnlyEnum::exHostReadWrite | Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowAddEmptyItem;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->SingleSel = false;
	var_G2antt->OnResizeControl = Exg2anttlib_tlb::OnResizeControlEnum::exResizeChart;
	var_G2antt->ScrollBars = Exg2anttlib_tlb::ScrollBarsEnum::exVScrollEmptySpace | Exg2anttlib_tlb::ScrollBarsEnum::exDisableNoVertical;
	Exg2anttlib_tlb::IColumnPtr var_Column = var_G2antt->Columns->Add(L"Start");
		var_Column->AllowSizing = false;
		var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(1));
		var_Column->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType;
	Exg2anttlib_tlb::IColumnPtr var_Column1 = var_G2antt->Columns->Add(L"End");
		var_Column1->AllowSizing = false;
		var_Column1->set_Def(Exg2anttlib_tlb::DefColumnEnum::exCellValueToItemBarProperty,TVariant(2));
		var_Column1->Editor->EditType = Exg2anttlib_tlb::EditTypeEnum::DateType;
	var_G2antt->Items->AllowCellValueToItemBar = true;
	Exg2anttlib_tlb::IChartPtr var_Chart = var_G2antt->Chart;
		var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exCreateBarAuto;
		var_Chart->set_PaneWidth(false,256);
		var_Chart->Bars->get_Item(TVariant("Task"))->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;

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

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IBarPtr var_Bar = (IDispatch*)G2Host1->Host->Chart->Bars->get_Item(TVariant("Task"));
	var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid;
	var_Bar->Color = RGB(0,0,255);
	var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarTransparent,TVariant(50));
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksColor] = L"Color";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksCaption] = L"TaskName";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
G2Host1->HostReadOnly = Exg2hostlib_tlb::HostReadOnlyEnum::exHostReadWrite | Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowAddEmptyItem;
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->OnResizeControl = Exg2anttlib_tlb::OnResizeControlEnum::exDisableSplitter | Exg2anttlib_tlb::OnResizeControlEnum::exResizeChart;
	Exg2anttlib_tlb::IChartPtr var_Chart = var_G2antt->Chart;
		var_Chart->ColumnsFormatLevel = L"1";
		var_Chart->set_PaneWidth(false,0);
		var_Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

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

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IBarPtr var_Bar = (IDispatch*)G2Host1->Host->Chart->Bars->get_Item(TVariant("Task"));
	var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid;
	var_Bar->Color = RGB(0,0,255);
	var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarTransparent,TVariant(50));
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksColor] = L"Color";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksCaption] = L"TaskName";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	Exg2anttlib_tlb::IChartPtr var_Chart = var_G2antt->Chart;
		var_Chart->set_PaneWidth(true,0);
		var_Chart->OverviewVisible = Exg2anttlib_tlb::OverviewVisibleEnum::exOverviewHidden;

40
How do hide the top/overview part of the control

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource];
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"BirthDate";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"HireDate";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	Exg2anttlib_tlb::IChartPtr var_Chart = var_G2antt->Chart;
		var_Chart->OverviewVisible = Exg2anttlib_tlb::OverviewVisibleEnum::exOverviewHidden;
		var_Chart->set_PaneWidth(false,256);
		var_Chart->ScrollTo(TDateTime(1969,4,27).operator double(),TVariant(1));

39
How do I resize the panels

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->VisualAppearance->Add(1,TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn"));
	Exg2anttlib_tlb::IBarPtr var_Bar = var_G2antt->Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->Height = 15;
		var_Bar->Color = 0x1ff0000;
		var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
		var_Bar->OverlaidGroup = L"Task,Progress";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksColor] = L"Color";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksCaption] = L"TaskName";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
Exg2anttlib_tlb::IChartPtr var_Chart = (IDispatch*)G2Host1->Host->Chart;
	var_Chart->set_PaneWidth(false,128);
	var_Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

38
How do I lock the first column

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->CountLockedColumns = 1;
	var_G2antt->BackColorLock = var_G2antt->BackColorAlternate;

37
How do I specify a different color for the tasks ( EBN color )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->VisualAppearance->Add(1,TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn"));
	Exg2anttlib_tlb::IBarPtr var_Bar = var_G2antt->Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->Height = 15;
		var_Bar->Color = 0x1ff0000;
		var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
		var_Bar->OverlaidGroup = L"Task,Progress";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksColor] = L"Color";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksCaption] = L"TaskName";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
(IDispatch*)G2Host1->Host->Chart->set_PaneWidth(false,256);
(IDispatch*)G2Host1->Host->Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

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

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IBarPtr var_Bar = (IDispatch*)G2Host1->Host->Chart->Bars->get_Item(TVariant("Task"));
	var_Bar->Pattern = Exg2anttlib_tlb::PatternEnum::exPatternSolid;
	var_Bar->Color = RGB(0,0,255);
	var_Bar->set_Def(Exg2anttlib_tlb::ItemBarPropertyEnum::exBarTransparent,TVariant(50));
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksColor] = L"Color";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksCaption] = L"TaskName";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
(IDispatch*)G2Host1->Host->Chart->set_PaneWidth(false,256);
(IDispatch*)G2Host1->Host->Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

35
GroupBy

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataSource[L"Links"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Links"] = L"EmployeeLinks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->AllowGroupBy = true;
	var_G2antt->SortBarVisible = true;
	var_G2antt->BackColorSortBar = G2Host1(IDispatch*)->Host->BackColor;
	var_G2antt->BackColorSortBarCaption = var_G2antt->BackColorSortBar;
	var_G2antt->SortBarCaption = L"<sha ;;0><fgcolor=FF0000>Drag a <b>column</b> header here to sort by that column.";
	Exg2anttlib_tlb::IBarPtr var_Bar = var_G2antt->Chart->Bars->get_Item(TVariant("Task"));
		var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
		var_Bar->OverlaidGroup = L"Task,Progress";
	var_G2antt->Items->set_ExpandItem(0,true);
	var_G2antt->CountLockedColumns = 1;
	var_G2antt->BackColorLock = var_G2antt->BackColorAlternate;
	Exg2anttlib_tlb::IColumnPtr var_Column = var_G2antt->Columns->get_Item(TVariant("EmployeeID"));
		var_Column->AllowGroupBy = false;
		var_Column->set_Def(Exg2anttlib_tlb::DefColumnEnum::exHeaderBackColor,TVariant(G2Host1(IDispatch*)->Host->BackColorAlternate));
	var_G2antt->Columns->get_Item(TVariant("Title"))->SortOrder = Exg2anttlib_tlb::SortOrderEnum::SortAscending;
(IDispatch*)G2Host1->Host->Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

34
How can I hide a column
// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
(IDispatch*)G2Host1->Host->Columns->get_Item(TVariant(0))->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 __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->HostDef[Exg2hostlib_tlb::DefHostPropertyEnum::exErrorClearOnChange] = TVariant(false);

32
No error is highligthed

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"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 __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->HostDef[Exg2hostlib_tlb::DefHostPropertyEnum::exErrorBackColor] = TVariant(0);
G2Host1->HostDef[Exg2hostlib_tlb::DefHostPropertyEnum::exErrorForeColor] = TVariant(16777215);

30
Is it possible to rename the (New) to something else

G2Host1->HostDef[Exg2hostlib_tlb::DefHostPropertyEnum::exNew] = TVariant("*");
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->BeginUpdate();
	var_G2antt->Items->AddItem(TVariant("A"));
	var_G2antt->Items->AddItem(TVariant("B"));
	var_G2antt->EndUpdate();
G2Host1->Refresh();

29
How can I hide the (New) item (sample 2)

G2Host1->HostReadOnly = Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowUpdate | Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowDelete;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->BeginUpdate();
	var_G2antt->Items->AddItem(TVariant("A"));
	var_G2antt->Items->AddItem(TVariant("B"));
	var_G2antt->EndUpdate();

28
How can I hide the (New) item (sample 1)

G2Host1->HostDef[Exg2hostlib_tlb::DefHostPropertyEnum::exNew] = TVariant("");
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->BeginUpdate();
	var_G2antt->Items->AddItem(TVariant("A"));
	var_G2antt->Items->AddItem(TVariant("B"));
	var_G2antt->EndUpdate();
G2Host1->Refresh();

27
Read-Only

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->HostReadOnly = Exg2hostlib_tlb::HostReadOnlyEnum::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 __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataSource[L"Links"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Links"] = L"EmployeeLinks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IBarPtr var_Bar = (IDispatch*)G2Host1->Host->Chart->Bars->get_Item(TVariant("Task"));
	var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
	var_Bar->OverlaidGroup = L"Task,Progress";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
G2Host1->HostReadOnly = Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowUpdate;
(IDispatch*)G2Host1->Host->Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

25
How do I get the row/item/task/link from the cursor

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

// HostEvent event - Notifies the application once the host fires an event.
void __fastcall TForm1::G2Host1HostEvent(TObject *Sender,Exg2hostlib_tlb::HostEventEnum   EventID)
{
	OutputDebugString( G2Host1->HostContext->ToString );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->HostReadOnly = Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowUpdate | Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowAddNew;

24
Disable Delete
// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->HostReadOnly = Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowUpdate | Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowAddNew;

23
Disable AddNew

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->HostReadOnly = Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowUpdate | Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowDelete;

22
ACCDB sample ( file )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataSource[L"Links"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Links"] = L"EmployeeLinks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IBarPtr var_Bar = (IDispatch*)G2Host1->Host->Chart->Bars->get_Item(TVariant("Task"));
	var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
	var_Bar->OverlaidGroup = L"Task,Progress";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
(IDispatch*)G2Host1->Host->Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

21
MDB sample ( file )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.mdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataSource[L"Links"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Links"] = L"EmployeeLinks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IBarPtr var_Bar = (IDispatch*)G2Host1->Host->Chart->Bars->get_Item(TVariant("Task"));
	var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
	var_Bar->OverlaidGroup = L"Task,Progress";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
(IDispatch*)G2Host1->Host->Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

20
DBF sample ( file )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.dbf");
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";

19
DAO sample ( object, DAO.DBEngine.120, multiple tasks, multiple tables )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft Office 12.0 Access database engine Object Library

	TypeLib: ACEDAO.DLL

	to define the namespace: Dao_tlb
*/
//#include "DAO_TLB.h"
Dao_tlb::_DBEnginePtr var_PrivDBEngine = Variant::CreateObject(L"DAO.DBEngine.120");
	Dao_tlb::DatabasePtr var_Database = var_PrivDBEngine->OpenDatabase(L"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",TNoParam(),TNoParam(),TNoParam());
		Dao_tlb::Recordset2Ptr rsEmployees = var_Database->OpenRecordset(L"Employees",TNoParam(),TNoParam(),TNoParam());
		Dao_tlb::Recordset2Ptr rsTasks = var_Database->OpenRecordset(L"EmployeeDetails",TNoParam(),TNoParam(),TNoParam());
		Dao_tlb::Recordset2Ptr rsLinks = var_Database->OpenRecordset(L"EmployeeLinks",TNoParam(),TNoParam(),TNoParam());
G2Host1->DataSource[L"Items"] = rsEmployees;
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataSource[L"Tasks"] = rsTasks;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataSource[L"Links"] = rsLinks;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IBarPtr var_Bar = (IDispatch*)G2Host1->Host->Chart->Bars->get_Item(TVariant("Task"));
	var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
	var_Bar->OverlaidGroup = L"Task,Progress";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
(IDispatch*)G2Host1->Host->Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

18
DAO sample ( file, multiple tasks, multiple tables )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataTechnology[L"Items"] = L"DAO.DBEngine.120;DAO.DBEngine.36";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataTechnology[L"Tasks"] = L"DAO.DBEngine.120;DAO.DBEngine.36";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataTechnology[L"Links"] = L"DAO.DBEngine.120;DAO.DBEngine.36";
G2Host1->DataSource[L"Links"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Links"] = L"EmployeeLinks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IBarPtr var_Bar = (IDispatch*)G2Host1->Host->Chart->Bars->get_Item(TVariant("Task"));
	var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
	var_Bar->OverlaidGroup = L"Task,Progress";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
(IDispatch*)G2Host1->Host->Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

17
DAO sample ( object, DAO.DBEngine.120, single task, single table )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft Office 12.0 Access database engine Object Library

	TypeLib: ACEDAO.DLL

	to define the namespace: Dao_tlb
*/
//#include "DAO_TLB.h"
Dao_tlb::_DBEnginePtr var_PrivDBEngine = Variant::CreateObject(L"DAO.DBEngine.120");
	Dao_tlb::DatabasePtr var_Database = var_PrivDBEngine->OpenDatabase(L"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",TNoParam(),TNoParam(),TNoParam());
		Dao_tlb::Recordset2Ptr rsEmployees = var_Database->OpenRecordset(L"Employees",TNoParam(),TNoParam(),TNoParam());
		Dao_tlb::Recordset2Ptr rsLinks = var_Database->OpenRecordset(L"EmployeeLinks",TNoParam(),TNoParam(),TNoParam());
G2Host1->DataSource[L"Items"] = rsEmployees;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource];
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"BirthDate";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"HireDate";
G2Host1->DataSource[L"Links"] = rsLinks;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";

16
DAO sample ( file, single task, single table )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataTechnology[L"Items"] = L"DAO.DBEngine.120;DAO.DBEngine.36";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource];
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"BirthDate";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"HireDate";
G2Host1->DataTechnology[L"Links"] = L"DAO.DBEngine.120;DAO.DBEngine.36";
G2Host1->DataSource[L"Links"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Links"] = L"EmployeeLinks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";

15
DAO sample ( tree recordset )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataTechnology[L"Items"] = L"DAO.DBEngine.120;DAO.DBEngine.36";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";

14
DAO sample ( flat recordset )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft Office 12.0 Access database engine Object Library

	TypeLib: ACEDAO.DLL

	to define the namespace: Dao_tlb
*/
//#include "DAO_TLB.h"
Dao_tlb::_DBEnginePtr var_PrivDBEngine = Variant::CreateObject(L"DAO.DBEngine.120");
	Dao_tlb::DatabasePtr var_Database = var_PrivDBEngine->OpenDatabase(L"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",TNoParam(),TNoParam(),TNoParam());
		Dao_tlb::Recordset2Ptr rsEmployees = var_Database->OpenRecordset(L"Employees",TNoParam(),TNoParam(),TNoParam());
G2Host1->DataSource[L"Items"] = rsEmployees;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";

13
DAO sample ( flat )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataTechnology[L"Items"] = L"DAO.DBEngine.120;DAO.DBEngine.36";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";

12
ADO sample ( object, ADODB.Recordset, multiple tasks )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rsEmployees = Variant::CreateObject(L"ADODB.Recordset");
rsEmployees->Open(TVariant("Employees"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2Host1->DataSource[L"Items"] = rsEmployees;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
Adodb_tlb::_RecordsetPtr rsTasks = Variant::CreateObject(L"ADODB.Recordset");
rsTasks->Open(TVariant("EmployeeDetails"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2Host1->DataSource[L"Tasks"] = rstasks;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
Adodb_tlb::_RecordsetPtr rsLinks = Variant::CreateObject(L"ADODB.Recordset");
rsLinks->Open(TVariant("EmployeeLinks"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2Host1->DataSource[L"Links"] = rsLinks;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IBarPtr var_Bar = (IDispatch*)G2Host1->Host->Chart->Bars->get_Item(TVariant("Task"));
	var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
	var_Bar->OverlaidGroup = L"Task,Progress";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
(IDispatch*)G2Host1->Host->Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

11
ADO sample ( file, multiple tasks, multiple tables )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataTechnology[L"Items"] = L"ADODB.Recordset;ADOR.Recordset";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataTechnology[L"Tasks"] = L"ADODB.Recordset;ADOR.Recordset";
G2Host1->DataSource[L"Tasks"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Tasks"] = L"EmployeeDetails";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = L"Tasks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksItemID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"DateStart";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"DateEnd";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksID] = L"TaskID";
G2Host1->DataTechnology[L"Links"] = L"ADODB.Recordset;ADOR.Recordset";
G2Host1->DataSource[L"Links"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Links"] = L"EmployeeLinks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IBarPtr var_Bar = (IDispatch*)G2Host1->Host->Chart->Bars->get_Item(TVariant("Task"));
	var_Bar->OverlaidType = Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStackAutoArrange | Exg2anttlib_tlb::OverlaidBarsTypeEnum::exOverlaidBarsStack;
	var_Bar->OverlaidGroup = L"Task,Progress";
(IDispatch*)G2Host1->Host->Items->set_ExpandItem(0,true);
(IDispatch*)G2Host1->Host->Chart->ScrollTo(TDateTime(2017,5,27).operator double(),TVariant(1));

10
ADO sample ( object, ADODB.Recordset, single task, single table )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rsEmployees = Variant::CreateObject(L"ADODB.Recordset");
rsEmployees->Open(TVariant("Employees"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2Host1->DataSource[L"Items"] = rsEmployees;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource];
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"BirthDate";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"HireDate";
Adodb_tlb::_RecordsetPtr rsLinks = Variant::CreateObject(L"ADODB.Recordset");
rsLinks->Open(TVariant("EmployeeLinks"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2Host1->DataSource[L"Links"] = rsLinks;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";

9
ADO sample ( file, single task, single table )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataTechnology[L"Items"] = L"ADODB.Recordset;ADOR.Recordset";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksDataSource] = G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource];
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksStart] = L"BirthDate";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exTasksEnd] = L"HireDate";
G2Host1->DataTechnology[L"Links"] = L"ADODB.Recordset;ADOR.Recordset";
G2Host1->DataSource[L"Links"] = TVariant(G2Host1->DataSource[L"Items"]);
G2Host1->DataMember[L"Links"] = L"EmployeeLinks";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksDataSource] = L"Links";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksStart] = L"Start";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exLinksEnd] = L"End";

8
ADO sample ( tree recordset )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataTechnology[L"Items"] = L"ADODB.Recordset;ADOR.Recordset";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsID] = L"EmployeeID";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsParentID] = L"ReportsTo";

7
ADO sample ( flat recordset )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft ActiveX Data Objects 6.1 Library

	TypeLib: msado15.dll

	to define the namespace: Adodb_tlb
*/
//#include "ADODB_TLB.h"
Adodb_tlb::_RecordsetPtr rsEmployees = Variant::CreateObject(L"ADODB.Recordset");
rsEmployees->Open(TVariant("Employees"),TVariant("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"),Adodb_tlb::CursorTypeEnum::adOpenStatic,Adodb_tlb::LockTypeEnum::adLockOptimistic,0);
G2Host1->DataSource[L"Items"] = rsEmployees;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";

6
ADO sample ( flat table )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataTechnology[L"Items"] = L"ADODB.Recordset;ADOR.Recordset";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
G2Host1->DataMember[L"Items"] = L"Employees";
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";

5
XML sample ( object, MSXML.DOMDocument )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		Microsoft XML, v3.0

	TypeLib: msxml3.dll

	to define the namespace: Msxml2_tlb
*/
//#include "MSXML2_TLB.h"
Msxml2_tlb::IXMLDOMDocument2Ptr xml = Variant::CreateObject(L"MSXML.DOMDocument");
xml->async = false;
xml->load(TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.xml"));
G2Host1->DataSource[L"Items"] = xml;
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot;
	var_G2antt->SingleSel = false;
	var_G2antt->AutoDrag = Exg2anttlib_tlb::AutoDragEnum::exAutoDragPositionAny;

4
XML sample ( file tree )

// Error event - Fired when an internal error occurs.
void __fastcall TForm1::G2Host1Error(TObject *Sender,long   Error,BSTR   Description)
{
	OutputDebugString( L"Error" );
	OutputDebugString( L"Description" );
}

G2Host1->DataTechnology[L"Items"] = L"MSXML.DOMDocument";
G2Host1->DataSource[L"Items"] = TVariant("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.xml");
G2Host1->DataField[Exg2hostlib_tlb::HostObjectFieldEnum::exItemsDataSource] = L"Items";
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->LinesAtRoot = Exg2anttlib_tlb::LinesAtRootEnum::exLinesAtRoot;
	var_G2antt->SingleSel = false;
	var_G2antt->AutoDrag = Exg2anttlib_tlb::AutoDragEnum::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 __fastcall TForm1::G2Host1HostEvent(TObject *Sender,Exg2hostlib_tlb::HostEventEnum   EventID)
{
	OutputDebugString( PChar(G2Host1->HostEventParam[-2]) );
}

G2Host1->HostReadOnly = Exg2hostlib_tlb::HostReadOnlyEnum::exHostReadWrite | Exg2hostlib_tlb::HostReadOnlyEnum::exHostAllowAddEmptyItem;
/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->ScrollBars = Exg2anttlib_tlb::ScrollBarsEnum::exVScrollEmptySpace | Exg2anttlib_tlb::ScrollBarsEnum::exDisableNoVertical;
	Exg2anttlib_tlb::IChartPtr var_Chart = var_G2antt->Chart;
		var_Chart->set_PaneWidth(false,128);
		var_Chart->AllowCreateBar = Exg2anttlib_tlb::CreateBarEnum::exCreateBarAuto;

2
How do I handle events of the host

// HostEvent event - Notifies the application once the host fires an event.
void __fastcall TForm1::G2Host1HostEvent(TObject *Sender,Exg2hostlib_tlb::HostEventEnum   EventID)
{
	OutputDebugString( PChar(G2Host1->HostEventParam[-2]) );
}

/*
	Select the Component\Import Component...\Import a Type Library,
	to import the following Type Library:

		ExG2antt 1.0 Control Library

	TypeLib: ExG2antt.dll

	to define the namespace: Exg2anttlib_tlb
*/
//#include "EXG2ANTTLIB_TLB.h"
Exg2anttlib_tlb::IG2anttPtr var_G2antt = (IDispatch*)G2Host1->Host;
	var_G2antt->BeginUpdate();
	var_G2antt->Columns->Add(L"new column");
	var_G2antt->EndUpdate();

1
How can I get the version of the host/exg2antt control

OutputDebugString( G2Host1->Version );
OutputDebugString( L"Host" );
OutputDebugString( G2Host1->Host->Version );