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.
private void axG2Host1_HostEvent(object sender, AxEXG2HOSTLib._IG2HostEvents_HostEventEvent e)
{
	object h = axG2Host1.get_HostEventParam(0);
	object key = axG2Host1.get_HostEventParam(1);
	System.Diagnostics.Debug.Print( axG2Host1.get_HostEventParam(-2).ToString() );
	System.Diagnostics.Debug.Print( "Start:" );
	System.Diagnostics.Debug.Print( axG2Host1.Host.Items.get_ItemBar(h,key,EXG2ANTTLib.ItemBarPropertyEnum.exBarStart).ToString() );
	System.Diagnostics.Debug.Print( axG2Host1.get_HostEventParam(-2).ToString() );
	System.Diagnostics.Debug.Print( "End:" );
	System.Diagnostics.Debug.Print( axG2Host1.Host.Items.get_ItemBar(h,key,EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd).ToString() );
}
//this.axG2Host1.HostEvent += new AxEXG2HOSTLib._IG2HostEvents_HostEventEventHandler(this.axG2Host1_HostEvent);

// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.Chart var_Chart = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart;
	var_Chart.set_PaneWidth(false,128);
	var_Chart.FirstVisibleDate = Convert.ToDateTime("3/30/2019",System.Globalization.CultureInfo.GetCultureInfo("en-US"));
EXG2ANTTLib.Items var_Items = (axG2Host1.Host as EXG2ANTTLib.G2antt).Items;
	var_Items.AddBar(var_Items.AddItem("Task"),"Task",Convert.ToDateTime("4/1/2019",System.Globalization.CultureInfo.GetCultureInfo("en-US")),Convert.ToDateTime("4/14/2019",System.Globalization.CultureInfo.GetCultureInfo("en-US")),null,null);

49
How do I get the bar/task from the cursor
// HostEvent event - Notifies the application once the host fires an event.
private void axG2Host1_HostEvent(object sender, AxEXG2HOSTLib._IG2HostEvents_HostEventEvent e)
{
	System.Diagnostics.Debug.Print( "Event:" );
	System.Diagnostics.Debug.Print( axG2Host1.get_HostEventParam(-2).ToString() );
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
		int i = var_G2antt.get_ItemFromPoint(-1,-1,c,h);
		System.Diagnostics.Debug.Print( "Cell:" );
		System.Diagnostics.Debug.Print( var_G2antt.Items.get_CellCaption(i,c) );
		EXG2ANTTLib.Chart var_Chart = var_G2antt.Chart;
			object b = var_Chart.get_BarFromPoint(-1,1);
			System.Diagnostics.Debug.Print( "Bar:" );
			System.Diagnostics.Debug.Print( (axG2Host1.Host as EXG2ANTTLib.G2antt).Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarName).ToString() );
}
//this.axG2Host1.HostEvent += new AxEXG2HOSTLib._IG2HostEvents_HostEventEventHandler(this.axG2Host1_HostEvent);


48
How do I get the cell from the cursor

// HostEvent event - Notifies the application once the host fires an event.
private void axG2Host1_HostEvent(object sender, AxEXG2HOSTLib._IG2HostEvents_HostEventEvent e)
{
	System.Diagnostics.Debug.Print( "Event:" );
	System.Diagnostics.Debug.Print( axG2Host1.get_HostEventParam(-2).ToString() );
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
		int i = var_G2antt.get_ItemFromPoint(-1,-1,c,h);
		System.Diagnostics.Debug.Print( "Cell:" );
		System.Diagnostics.Debug.Print( var_G2antt.Items.get_CellCaption(i,c) );
}
//this.axG2Host1.HostEvent += new AxEXG2HOSTLib._IG2HostEvents_HostEventEventHandler(this.axG2Host1_HostEvent);


47
How can I highlights cells based on its value

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.BeginUpdate();
	var_G2antt.BackColorAlternate = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,0));
	EXG2ANTTLib.Column var_Column = var_G2antt.Columns["Title"];
		var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellBackColor,15790320);
		var_Column.Width = var_Column.AutoWidth;
	EXG2ANTTLib.ConditionalFormats var_ConditionalFormats = var_G2antt.ConditionalFormats;
		var_ConditionalFormats.Add("lower(%4) contains `manager`",null).Bold = true;
		var_ConditionalFormats.Add("%3",null).BackColor = (uint)ColorTranslator.ToWin32(Color.FromArgb(240,240,240));
	var_G2antt.Items.set_ExpandItem(0,true);
	EXG2ANTTLib.Column var_Column1 = var_G2antt.Columns["EmployeeID"];
		var_Column1.Width = var_Column1.AutoWidth;
	var_G2antt.EndUpdate();

46
How do I programatically hide a column

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
(axG2Host1.Host as EXG2ANTTLib.G2antt).Columns["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.
private void axG2Host1_HostEvent(object sender, AxEXG2HOSTLib._IG2HostEvents_HostEventEvent e)
{
	System.Diagnostics.Debug.Print( axG2Host1.get_HostEventParam(-2).ToString() );
	// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
	EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
		int i = var_G2antt.get_ItemFromPoint(-1,-1,c,hit);
		System.Diagnostics.Debug.Print( "cell's value from cursor: " );
		System.Diagnostics.Debug.Print( var_G2antt.Items.get_CellValue(i,c).ToString() );
		System.Diagnostics.Debug.Print( "cell's value on col 1: " );
		System.Diagnostics.Debug.Print( var_G2antt.Items.get_CellValue(i,1).ToString() );
		object b = var_G2antt.Chart.get_BarFromPoint(-1,-1);
		System.Diagnostics.Debug.Print( "Bar:" );
		System.Diagnostics.Debug.Print( b.ToString() );
		System.Diagnostics.Debug.Print( "Bar Start:" );
		System.Diagnostics.Debug.Print( var_G2antt.Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarStart).ToString() );
		System.Diagnostics.Debug.Print( "Bar End:" );
		System.Diagnostics.Debug.Print( var_G2antt.Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd).ToString() );
		System.Diagnostics.Debug.Print( "Bar Caption:" );
		System.Diagnostics.Debug.Print( var_G2antt.Items.get_ItemBar(i,b,EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption).ToString() );
}
//this.axG2Host1.HostEvent += new AxEXG2HOSTLib._IG2HostEvents_HostEventEventHandler(this.axG2Host1_HostEvent);

EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.Debug = true;
	EXG2ANTTLib.Bar var_Bar = var_G2antt.Chart.Bars["Task"];
		var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
		var_Bar.OverlaidGroup = "Task,Progress";
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName");
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
EXG2ANTTLib.Chart var_Chart = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart;
	var_Chart.set_PaneWidth(false,128);
	var_Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

44
How do I get the bar from the cursor

// HostEvent event - Notifies the application once the host fires an event.
private void axG2Host1_HostEvent(object sender, AxEXG2HOSTLib._IG2HostEvents_HostEventEvent e)
{
	System.Diagnostics.Debug.Print( axG2Host1.get_HostEventParam(-2).ToString() );
	System.Diagnostics.Debug.Print( axG2Host1.Host.Chart.get_BarFromPoint(-1,-1).ToString() );
}
//this.axG2Host1.HostEvent += new AxEXG2HOSTLib._IG2HostEvents_HostEventEventHandler(this.axG2Host1_HostEvent);

// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.VisualAppearance.Add(1,"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn");
	EXG2ANTTLib.Bar var_Bar = var_G2antt.Chart.Bars["Task"];
		var_Bar.Height = 15;
		var_Bar.Color = 0x1ff0000;
		var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
		var_Bar.OverlaidGroup = "Task,Progress";
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName");
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
EXG2ANTTLib.Chart var_Chart = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart;
	var_Chart.set_PaneWidth(false,128);
	var_Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

43
How do I add Start/End columns

// HostEvent event - Notifies the application once the host fires an event.
private void axG2Host1_HostEvent(object sender, AxEXG2HOSTLib._IG2HostEvents_HostEventEvent e)
{
	System.Diagnostics.Debug.Print( axG2Host1.get_HostEventParam(-2).ToString() );
}
//this.axG2Host1.HostEvent += new AxEXG2HOSTLib._IG2HostEvents_HostEventEventHandler(this.axG2Host1_HostEvent);

axG2Host1.HostReadOnly = EXG2HOSTLib.HostReadOnlyEnum.exHostReadWrite | EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddEmptyItem;
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.SingleSel = false;
	var_G2antt.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exResizeChart;
	var_G2antt.ScrollBars = EXG2ANTTLib.ScrollBarsEnum.exVScrollEmptySpace | EXG2ANTTLib.ScrollBarsEnum.exDisableNoVertical;
	EXG2ANTTLib.Column var_Column = (var_G2antt.Columns.Add("Start") as EXG2ANTTLib.Column);
		var_Column.AllowSizing = false;
		var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,1);
		var_Column.Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType;
	EXG2ANTTLib.Column var_Column1 = (var_G2antt.Columns.Add("End") as EXG2ANTTLib.Column);
		var_Column1.AllowSizing = false;
		var_Column1.set_Def(EXG2ANTTLib.DefColumnEnum.exCellValueToItemBarProperty,2);
		var_Column1.Editor.EditType = EXG2ANTTLib.EditTypeEnum.DateType;
	var_G2antt.Items.AllowCellValueToItemBar = true;
	EXG2ANTTLib.Chart var_Chart = var_G2antt.Chart;
		var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;
		var_Chart.set_PaneWidth(false,256);
		var_Chart.Bars["Task"].OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.Bar var_Bar = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.Bars["Task"];
	var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternSolid;
	var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255));
	var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,50);
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName");
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
axG2Host1.HostReadOnly = EXG2HOSTLib.HostReadOnlyEnum.exHostReadWrite | EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddEmptyItem;
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter | EXG2ANTTLib.OnResizeControlEnum.exResizeChart;
	EXG2ANTTLib.Chart var_Chart = var_G2antt.Chart;
		var_Chart.ColumnsFormatLevel = "1";
		var_Chart.set_PaneWidth(false,0);
		var_Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.Bar var_Bar = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.Bars["Task"];
	var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternSolid;
	var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255));
	var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,50);
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName");
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	EXG2ANTTLib.Chart var_Chart = var_G2antt.Chart;
		var_Chart.set_PaneWidth(true,0);
		var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewHidden;

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,axG2Host1.get_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	EXG2ANTTLib.Chart var_Chart = var_G2antt.Chart;
		var_Chart.OverviewVisible = EXG2ANTTLib.OverviewVisibleEnum.exOverviewHidden;
		var_Chart.set_PaneWidth(false,256);
		var_Chart.ScrollTo(Convert.ToDateTime("4/27/1969",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

39
How do I resize the panels

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.VisualAppearance.Add(1,"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn");
	EXG2ANTTLib.Bar var_Bar = var_G2antt.Chart.Bars["Task"];
		var_Bar.Height = 15;
		var_Bar.Color = 0x1ff0000;
		var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
		var_Bar.OverlaidGroup = "Task,Progress";
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName");
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
EXG2ANTTLib.Chart var_Chart = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart;
	var_Chart.set_PaneWidth(false,128);
	var_Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

38
How do I lock the first column

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	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.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.VisualAppearance.Add(1,"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn");
	EXG2ANTTLib.Bar var_Bar = var_G2antt.Chart.Bars["Task"];
		var_Bar.Height = 15;
		var_Bar.Color = 0x1ff0000;
		var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
		var_Bar.OverlaidGroup = "Task,Progress";
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName");
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.set_PaneWidth(false,256);
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.Bar var_Bar = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.Bars["Task"];
	var_Bar.Pattern = EXG2ANTTLib.PatternEnum.exPatternSolid;
	var_Bar.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(0,0,255));
	var_Bar.set_Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,50);
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName");
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.set_PaneWidth(false,256);
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

35
GroupBy

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataSource("Links",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Links","EmployeeLinks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.AllowGroupBy = true;
	var_G2antt.SortBarVisible = true;
	var_G2antt.BackColorSortBar = (axG2Host1.Host as EXG2ANTTLib.G2antt).BackColor;
	var_G2antt.BackColorSortBarCaption = var_G2antt.BackColorSortBar;
	var_G2antt.SortBarCaption = "<sha ;;0><fgcolor=FF0000>Drag a <b>column</b> header here to sort by that column.";
	EXG2ANTTLib.Bar var_Bar = var_G2antt.Chart.Bars["Task"];
		var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
		var_Bar.OverlaidGroup = "Task,Progress";
	var_G2antt.Items.set_ExpandItem(0,true);
	var_G2antt.CountLockedColumns = 1;
	var_G2antt.BackColorLock = var_G2antt.BackColorAlternate;
	EXG2ANTTLib.Column var_Column = var_G2antt.Columns["EmployeeID"];
		var_Column.AllowGroupBy = false;
		var_Column.set_Def(EXG2ANTTLib.DefColumnEnum.exHeaderBackColor,(axG2Host1.Host as EXG2ANTTLib.G2antt).BackColorAlternate);
	var_G2antt.Columns["Title"].SortOrder = EXG2ANTTLib.SortOrderEnum.SortAscending;
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

34
How can I hide a column
// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
(axG2Host1.Host as EXG2ANTTLib.G2antt).Columns[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.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_HostDef(EXG2HOSTLib.DefHostPropertyEnum.exErrorClearOnChange,false);

32
No error is highligthed

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.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.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_HostDef(EXG2HOSTLib.DefHostPropertyEnum.exErrorBackColor,0);
axG2Host1.set_HostDef(EXG2HOSTLib.DefHostPropertyEnum.exErrorForeColor,16777215);

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

axG2Host1.set_HostDef(EXG2HOSTLib.DefHostPropertyEnum.exNew,"*");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.BeginUpdate();
	var_G2antt.Items.AddItem("A");
	var_G2antt.Items.AddItem("B");
	var_G2antt.EndUpdate();
axG2Host1.Refresh();

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

axG2Host1.HostReadOnly = EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate | EXG2HOSTLib.HostReadOnlyEnum.exHostAllowDelete;
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.BeginUpdate();
	var_G2antt.Items.AddItem("A");
	var_G2antt.Items.AddItem("B");
	var_G2antt.EndUpdate();

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

axG2Host1.set_HostDef(EXG2HOSTLib.DefHostPropertyEnum.exNew,"");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.BeginUpdate();
	var_G2antt.Items.AddItem("A");
	var_G2antt.Items.AddItem("B");
	var_G2antt.EndUpdate();
axG2Host1.Refresh();

27
Read-Only

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.HostReadOnly = EXG2HOSTLib.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.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataSource("Links",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Links","EmployeeLinks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.Bar var_Bar = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.Bars["Task"];
	var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
	var_Bar.OverlaidGroup = "Task,Progress";
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
axG2Host1.HostReadOnly = EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate;
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// HostEvent event - Notifies the application once the host fires an event.
private void axG2Host1_HostEvent(object sender, AxEXG2HOSTLib._IG2HostEvents_HostEventEvent e)
{
	System.Diagnostics.Debug.Print( axG2Host1.HostContext.ToString );
}
//this.axG2Host1.HostEvent += new AxEXG2HOSTLib._IG2HostEvents_HostEventEventHandler(this.axG2Host1_HostEvent);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.HostReadOnly = EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate | EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddNew;

24
Disable Delete
// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.HostReadOnly = EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate | EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddNew;

23
Disable AddNew

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.HostReadOnly = EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate | EXG2HOSTLib.HostReadOnlyEnum.exHostAllowDelete;

22
ACCDB sample ( file )

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataSource("Links",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Links","EmployeeLinks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.Bar var_Bar = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.Bars["Task"];
	var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
	var_Bar.OverlaidGroup = "Task,Progress";
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

21
MDB sample ( file )

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.mdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataSource("Links",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Links","EmployeeLinks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.Bar var_Bar = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.Bars["Task"];
	var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
	var_Bar.OverlaidGroup = "Task,Progress";
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

20
DBF sample ( file )

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.dbf");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'Microsoft Office 12.0 Access database engine Object Library(ACEDAO.DLL)' reference to your project.
DAO.PrivDBEngine var_PrivDBEngine = new DAO.PrivDBEngine();
	DAO.Database var_Database = var_PrivDBEngine.OpenDatabase("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",null,null,null);
		DAO.Recordset2 rsEmployees = (var_Database.OpenRecordset("Employees",null,null,null) as DAO.Recordset2);
		DAO.Recordset2 rsTasks = (var_Database.OpenRecordset("EmployeeDetails",null,null,null) as DAO.Recordset2);
		DAO.Recordset2 rsLinks = (var_Database.OpenRecordset("EmployeeLinks",null,null,null) as DAO.Recordset2);
axG2Host1.set_DataSource("Items",(rsEmployees as DAO.Recordset2));
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataSource("Tasks",(rsTasks as DAO.Recordset2));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataSource("Links",(rsLinks as DAO.Recordset2));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.Bar var_Bar = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.Bars["Task"];
	var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
	var_Bar.OverlaidGroup = "Task,Progress";
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataTechnology("Tasks","DAO.DBEngine.120;DAO.DBEngine.36");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataTechnology("Links","DAO.DBEngine.120;DAO.DBEngine.36");
axG2Host1.set_DataSource("Links",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Links","EmployeeLinks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.Bar var_Bar = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.Bars["Task"];
	var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
	var_Bar.OverlaidGroup = "Task,Progress";
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'Microsoft Office 12.0 Access database engine Object Library(ACEDAO.DLL)' reference to your project.
DAO.PrivDBEngine var_PrivDBEngine = new DAO.PrivDBEngine();
	DAO.Database var_Database = var_PrivDBEngine.OpenDatabase("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",null,null,null);
		DAO.Recordset2 rsEmployees = (var_Database.OpenRecordset("Employees",null,null,null) as DAO.Recordset2);
		DAO.Recordset2 rsLinks = (var_Database.OpenRecordset("EmployeeLinks",null,null,null) as DAO.Recordset2);
axG2Host1.set_DataSource("Items",(rsEmployees as DAO.Recordset2));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,axG2Host1.get_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate");
axG2Host1.set_DataSource("Links",(rsLinks as DAO.Recordset2));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,axG2Host1.get_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate");
axG2Host1.set_DataTechnology("Links","DAO.DBEngine.120;DAO.DBEngine.36");
axG2Host1.set_DataSource("Links",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Links","EmployeeLinks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");

15
DAO sample ( tree recordset )

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");

14
DAO sample ( flat recordset )

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'Microsoft Office 12.0 Access database engine Object Library(ACEDAO.DLL)' reference to your project.
DAO.PrivDBEngine var_PrivDBEngine = new DAO.PrivDBEngine();
	DAO.Database var_Database = var_PrivDBEngine.OpenDatabase("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",null,null,null);
		DAO.Recordset2 rsEmployees = (var_Database.OpenRecordset("Employees",null,null,null) as DAO.Recordset2);
axG2Host1.set_DataSource("Items",(rsEmployees as DAO.Recordset2));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");

13
DAO sample ( flat )

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36");
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
ADODB.Recordset rsEmployees = new ADODB.Recordset();
rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0);
axG2Host1.set_DataSource("Items",(rsEmployees as ADODB.Recordset));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
ADODB.Recordset rsTasks = new ADODB.Recordset();
rsTasks.Open("EmployeeDetails","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0);
axG2Host1.set_DataSource("Tasks",(rstasks as ADODB.Recordset));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
ADODB.Recordset rsLinks = new ADODB.Recordset();
rsLinks.Open("EmployeeLinks","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0);
axG2Host1.set_DataSource("Links",(rsLinks as ADODB.Recordset));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.Bar var_Bar = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.Bars["Task"];
	var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
	var_Bar.OverlaidGroup = "Task,Progress";
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataTechnology("Tasks","ADODB.Recordset;ADOR.Recordset");
axG2Host1.set_DataSource("Tasks",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Tasks","EmployeeDetails");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID");
axG2Host1.set_DataTechnology("Links","ADODB.Recordset;ADOR.Recordset");
axG2Host1.set_DataSource("Links",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Links","EmployeeLinks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.Bar var_Bar = (axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.Bars["Task"];
	var_Bar.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack;
	var_Bar.OverlaidGroup = "Task,Progress";
(axG2Host1.Host as EXG2ANTTLib.G2antt).Items.set_ExpandItem(0,true);
(axG2Host1.Host as EXG2ANTTLib.G2antt).Chart.ScrollTo(Convert.ToDateTime("5/27/2017",System.Globalization.CultureInfo.GetCultureInfo("en-US")),1);

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
ADODB.Recordset rsEmployees = new ADODB.Recordset();
rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0);
axG2Host1.set_DataSource("Items",(rsEmployees as ADODB.Recordset));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,axG2Host1.get_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate");
ADODB.Recordset rsLinks = new ADODB.Recordset();
rsLinks.Open("EmployeeLinks","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0);
axG2Host1.set_DataSource("Links",(rsLinks as ADODB.Recordset));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");

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

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,axG2Host1.get_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate");
axG2Host1.set_DataTechnology("Links","ADODB.Recordset;ADOR.Recordset");
axG2Host1.set_DataSource("Links",axG2Host1.get_DataSource("Items"));
axG2Host1.set_DataMember("Links","EmployeeLinks");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End");

8
ADO sample ( tree recordset )

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo");

7
ADO sample ( flat recordset )

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project.
ADODB.Recordset rsEmployees = new ADODB.Recordset();
rsEmployees.Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb",ADODB.CursorTypeEnum.adOpenStatic,ADODB.LockTypeEnum.adLockOptimistic,0);
axG2Host1.set_DataSource("Items",(rsEmployees as ADODB.Recordset));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");

6
ADO sample ( flat table )

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset");
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb");
axG2Host1.set_DataMember("Items","Employees");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");

5
XML sample ( object, MSXML.DOMDocument )

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

// Add 'Microsoft XML, v3.0(msxml3.dll)' reference to your project.
MSXML2.FreeThreadedDOMDocument30 xml = new MSXML2.FreeThreadedDOMDocument30();
xml.async = false;
xml.load("C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.xml");
axG2Host1.set_DataSource("Items",(xml as MSXML2.FreeThreadedDOMDocument30));
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	var_G2antt.SingleSel = false;
	var_G2antt.AutoDrag = EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny;

4
XML sample ( file tree )

// Error event - Fired when an internal error occurs.
private void axG2Host1_Error(object sender, AxEXG2HOSTLib._IG2HostEvents_ErrorEvent e)
{
	System.Diagnostics.Debug.Print( e.error.ToString() );
	System.Diagnostics.Debug.Print( e.description.ToString() );
}
//this.axG2Host1.Error += new AxEXG2HOSTLib._IG2HostEvents_ErrorEventHandler(this.axG2Host1_Error);

axG2Host1.set_DataTechnology("Items","MSXML.DOMDocument");
axG2Host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.xml");
axG2Host1.set_DataField(EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items");
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot;
	var_G2antt.SingleSel = false;
	var_G2antt.AutoDrag = EXG2ANTTLib.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.
private void axG2Host1_HostEvent(object sender, AxEXG2HOSTLib._IG2HostEvents_HostEventEvent e)
{
	System.Diagnostics.Debug.Print( axG2Host1.get_HostEventParam(-2).ToString() );
}
//this.axG2Host1.HostEvent += new AxEXG2HOSTLib._IG2HostEvents_HostEventEventHandler(this.axG2Host1_HostEvent);

axG2Host1.HostReadOnly = EXG2HOSTLib.HostReadOnlyEnum.exHostReadWrite | EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddEmptyItem;
// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.ScrollBars = EXG2ANTTLib.ScrollBarsEnum.exVScrollEmptySpace | EXG2ANTTLib.ScrollBarsEnum.exDisableNoVertical;
	EXG2ANTTLib.Chart var_Chart = var_G2antt.Chart;
		var_Chart.set_PaneWidth(false,128);
		var_Chart.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto;

2
How do I handle events of the host

// HostEvent event - Notifies the application once the host fires an event.
private void axG2Host1_HostEvent(object sender, AxEXG2HOSTLib._IG2HostEvents_HostEventEvent e)
{
	System.Diagnostics.Debug.Print( axG2Host1.get_HostEventParam(-2).ToString() );
}
//this.axG2Host1.HostEvent += new AxEXG2HOSTLib._IG2HostEvents_HostEventEventHandler(this.axG2Host1_HostEvent);

// Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project.
EXG2ANTTLib.G2antt var_G2antt = (axG2Host1.Host as EXG2ANTTLib.G2antt);
	var_G2antt.BeginUpdate();
	var_G2antt.Columns.Add("new column");
	var_G2antt.EndUpdate();

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

System.Diagnostics.Debug.Print( axG2Host1.Version );
System.Diagnostics.Debug.Print( "Host" );
System.Diagnostics.Debug.Print( axG2Host1.Host.Version );