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 exg2host1_HostEvent(object sender,exontrol.EXG2HOSTLib.HostEventEnum EventID) { object h = exg2host1.get_HostEventParam(0); object key = exg2host1.get_HostEventParam(1); System.Diagnostics.Debug.Print( exg2host1.get_HostEventParam(-2).ToString() ); System.Diagnostics.Debug.Print( "Start:" ); System.Diagnostics.Debug.Print( exg2host1.Host.Items.get_ItemBar(h,key,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarStart).ToString() ); System.Diagnostics.Debug.Print( exg2host1.get_HostEventParam(-2).ToString() ); System.Diagnostics.Debug.Print( "End:" ); System.Diagnostics.Debug.Print( exg2host1.Host.Items.get_ItemBar(h,key,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd).ToString() ); } //this.exg2host1.HostEvent += new exontrol.EXG2HOSTLib.exg2antt.HostEventEventHandler(this.exg2host1_HostEvent); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.Chart var_Chart = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart; var_Chart.set_PaneWidth(false,128); var_Chart.FirstVisibleDate = Convert.ToDateTime("3/30/2019",System.Globalization.CultureInfo.GetCultureInfo("en-US")); exontrol.EXG2ANTTLib.Items var_Items = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_HostEvent(object sender,exontrol.EXG2HOSTLib.HostEventEnum EventID) { System.Diagnostics.Debug.Print( "Event:" ); System.Diagnostics.Debug.Print( exg2host1.get_HostEventParam(-2).ToString() ); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); 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) ); exontrol.EXG2ANTTLib.Chart var_Chart = var_G2antt.Chart; object b = var_Chart.get_BarFromPoint(-1,1); System.Diagnostics.Debug.Print( "Bar:" ); System.Diagnostics.Debug.Print( (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.get_ItemBar(i,b,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarName).ToString() ); } //this.exg2host1.HostEvent += new exontrol.EXG2HOSTLib.exg2antt.HostEventEventHandler(this.exg2host1_HostEvent); |
48 |
How do I get the cell from the cursor
// HostEvent event - Notifies the application once the host fires an event. private void exg2host1_HostEvent(object sender,exontrol.EXG2HOSTLib.HostEventEnum EventID) { System.Diagnostics.Debug.Print( "Event:" ); System.Diagnostics.Debug.Print( exg2host1.get_HostEventParam(-2).ToString() ); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); 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.exg2host1.HostEvent += new exontrol.EXG2HOSTLib.exg2antt.HostEventEventHandler(this.exg2host1_HostEvent); |
47 |
How can I highlights cells based on its value
exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); var_G2antt.BeginUpdate(); var_G2antt.BackColorAlternate = Color.FromArgb(0,0,0); exontrol.EXG2ANTTLib.Column var_Column = var_G2antt.Columns["Title"]; var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exCellBackColor,15790320); var_Column.Width = var_Column.AutoWidth; exontrol.EXG2ANTTLib.ConditionalFormats var_ConditionalFormats = var_G2antt.ConditionalFormats; var_ConditionalFormats.Add("lower(%4) contains `manager`",null).Bold = true; var_ConditionalFormats.Add("%3",null).BackColor = Color.FromArgb(240,240,240); var_G2antt.Items.set_ExpandItem(0,true); exontrol.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
exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_HostEvent(object sender,exontrol.EXG2HOSTLib.HostEventEnum EventID) { System.Diagnostics.Debug.Print( exg2host1.get_HostEventParam(-2).ToString() ); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); 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,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarStart).ToString() ); System.Diagnostics.Debug.Print( "Bar End:" ); System.Diagnostics.Debug.Print( var_G2antt.Items.get_ItemBar(i,b,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd).ToString() ); System.Diagnostics.Debug.Print( "Bar Caption:" ); System.Diagnostics.Debug.Print( var_G2antt.Items.get_ItemBar(i,b,exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption).ToString() ); } //this.exg2host1.HostEvent += new exontrol.EXG2HOSTLib.exg2antt.HostEventEventHandler(this.exg2host1_HostEvent); exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); var_G2antt.Debug = true; exontrol.EXG2ANTTLib.Bar var_Bar = var_G2antt.Chart.Bars["Task"]; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,Progress"; exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName"); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); exontrol.EXG2ANTTLib.Chart var_Chart = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_HostEvent(object sender,exontrol.EXG2HOSTLib.HostEventEnum EventID) { System.Diagnostics.Debug.Print( exg2host1.get_HostEventParam(-2).ToString() ); System.Diagnostics.Debug.Print( exg2host1.Host.Chart.get_BarFromPoint(-1,-1).ToString() ); } //this.exg2host1.HostEvent += new exontrol.EXG2HOSTLib.exg2antt.HostEventEventHandler(this.exg2host1_HostEvent); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); var_G2antt.VisualAppearance.Add(1,"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn"); exontrol.EXG2ANTTLib.Bar var_Bar = var_G2antt.Chart.Bars["Task"]; var_Bar.Height = 15; var_Bar.Color32 = 0x1ff0000; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,Progress"; exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName"); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); exontrol.EXG2ANTTLib.Chart var_Chart = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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
|
42 |
How do I hide the left/items/columns part of the control
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.Bar var_Bar = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.Bars["Task"]; var_Bar.Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid; var_Bar.Color = Color.FromArgb(0,0,255); var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,50); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName"); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); exg2host1.HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostReadWrite | exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddEmptyItem; exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); var_G2antt.OnResizeControl = exontrol.EXG2ANTTLib.OnResizeControlEnum.exDisableSplitter | exontrol.EXG2ANTTLib.OnResizeControlEnum.exResizeChart; exontrol.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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.Bar var_Bar = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.Bars["Task"]; var_Bar.Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid; var_Bar.Color = Color.FromArgb(0,0,255); var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,50); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName"); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); exontrol.EXG2ANTTLib.Chart var_Chart = var_G2antt.Chart; var_Chart.set_PaneWidth(true,0); var_Chart.OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewHidden; |
40 |
How do hide the top/overview part of the control
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,exg2host1.get_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); exontrol.EXG2ANTTLib.Chart var_Chart = var_G2antt.Chart; var_Chart.OverviewVisible = exontrol.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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); var_G2antt.VisualAppearance.Add(1,"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn"); exontrol.EXG2ANTTLib.Bar var_Bar = var_G2antt.Chart.Bars["Task"]; var_Bar.Height = 15; var_Bar.Color32 = 0x1ff0000; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,Progress"; exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName"); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); exontrol.EXG2ANTTLib.Chart var_Chart = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); 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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); var_G2antt.VisualAppearance.Add(1,"C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\EBN\\Assorted\\wbs-ass.ebn"); exontrol.EXG2ANTTLib.Bar var_Bar = var_G2antt.Chart.Bars["Task"]; var_Bar.Height = 15; var_Bar.Color32 = 0x1ff0000; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,Progress"; exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName"); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.set_PaneWidth(false,256); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.Bar var_Bar = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.Bars["Task"]; var_Bar.Pattern = exontrol.EXG2ANTTLib.PatternEnum.exPatternSolid; var_Bar.Color = Color.FromArgb(0,0,255); var_Bar.set_Def(exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarTransparent,50); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksColor,"Color"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksCaption,"TaskName"); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.set_PaneWidth(false,256); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataSource("Links",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Links","EmployeeLinks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); var_G2antt.AllowGroupBy = true; var_G2antt.SortBarVisible = true; var_G2antt.BackColorSortBar = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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."; exontrol.EXG2ANTTLib.Bar var_Bar = var_G2antt.Chart.Bars["Task"]; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.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; exontrol.EXG2ANTTLib.Column var_Column = var_G2antt.Columns["EmployeeID"]; var_Column.AllowGroupBy = false; var_Column.set_Def(exontrol.EXG2ANTTLib.DefColumnEnum.exHeaderBackColor,(exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).BackColorAlternate); var_G2antt.Columns["Title"].SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending; (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_HostDef(exontrol.EXG2HOSTLib.DefHostPropertyEnum.exErrorClearOnChange,false); |
32 |
No error is highligthed
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_HostDef(exontrol.EXG2HOSTLib.DefHostPropertyEnum.exErrorBackColor,0); exg2host1.set_HostDef(exontrol.EXG2HOSTLib.DefHostPropertyEnum.exErrorForeColor,16777215); |
30 |
Is it possible to rename the (New) to something else
|
29 |
How can I hide the (New) item (sample 2)
|
28 |
How can I hide the (New) item (sample 1)
|
27 |
Read-Only
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.HostReadOnly = exontrol.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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataSource("Links",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Links","EmployeeLinks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.Bar var_Bar = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.Bars["Task"]; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,Progress"; (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); exg2host1.HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate; (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); // HostEvent event - Notifies the application once the host fires an event. private void exg2host1_HostEvent(object sender,exontrol.EXG2HOSTLib.HostEventEnum EventID) { System.Diagnostics.Debug.Print( exg2host1.HostContext.ToString ); } //this.exg2host1.HostEvent += new exontrol.EXG2HOSTLib.exg2antt.HostEventEventHandler(this.exg2host1_HostEvent); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate | exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddNew; |
24 |
Disable Delete
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate | exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddNew; |
23 |
Disable AddNew
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowUpdate | exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowDelete; |
22 |
ACCDB sample ( file )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataSource("Links",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Links","EmployeeLinks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.Bar var_Bar = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.Bars["Task"]; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,Progress"; (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.mdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataSource("Links",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Links","EmployeeLinks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.Bar var_Bar = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.Bars["Task"]; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,Progress"; (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.dbf"); exg2host1.set_DataField(exontrol.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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_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); exg2host1.set_DataSource("Items",(rsEmployees as DAO.Recordset2)); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataSource("Tasks",(rsTasks as DAO.Recordset2)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataSource("Links",(rsLinks as DAO.Recordset2)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.Bar var_Bar = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.Bars["Task"]; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,Progress"; (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36"); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataTechnology("Tasks","DAO.DBEngine.120;DAO.DBEngine.36"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataTechnology("Links","DAO.DBEngine.120;DAO.DBEngine.36"); exg2host1.set_DataSource("Links",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Links","EmployeeLinks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.Bar var_Bar = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.Bars["Task"]; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,Progress"; (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_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); exg2host1.set_DataSource("Items",(rsEmployees as DAO.Recordset2)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,exg2host1.get_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate"); exg2host1.set_DataSource("Links",(rsLinks as DAO.Recordset2)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); |
16 |
DAO sample ( file, single task, single table )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36"); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,exg2host1.get_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate"); exg2host1.set_DataTechnology("Links","DAO.DBEngine.120;DAO.DBEngine.36"); exg2host1.set_DataSource("Links",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Links","EmployeeLinks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); |
15 |
DAO sample ( tree recordset )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36"); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); |
14 |
DAO sample ( flat recordset )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_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); exg2host1.set_DataSource("Items",(rsEmployees as DAO.Recordset2)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); |
13 |
DAO sample ( flat )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataTechnology("Items","DAO.DBEngine.120;DAO.DBEngine.36"); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); |
12 |
ADO sample ( object, ADODB.Recordset, multiple tasks )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_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",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2host1.set_DataSource("Items",(rsEmployees as ADODB.Recordset)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.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",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2host1.set_DataSource("Tasks",(rstasks as ADODB.Recordset)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.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",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2host1.set_DataSource("Links",(rsLinks as ADODB.Recordset)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.Bar var_Bar = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.Bars["Task"]; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,Progress"; (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset"); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataTechnology("Tasks","ADODB.Recordset;ADOR.Recordset"); exg2host1.set_DataSource("Tasks",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Tasks","EmployeeDetails"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,"Tasks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksItemID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"DateStart"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"DateEnd"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksID,"TaskID"); exg2host1.set_DataTechnology("Links","ADODB.Recordset;ADOR.Recordset"); exg2host1.set_DataSource("Links",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Links","EmployeeLinks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.Bar var_Bar = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Chart.Bars["Task"]; var_Bar.OverlaidType = exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange | exontrol.EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack; var_Bar.OverlaidGroup = "Task,Progress"; (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).Items.set_ExpandItem(0,true); (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt).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 exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_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",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2host1.set_DataSource("Items",(rsEmployees as ADODB.Recordset)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,exg2host1.get_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate"); exg2host1.set_DataField(exontrol.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",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2host1.set_DataSource("Links",(rsLinks as ADODB.Recordset)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); |
9 |
ADO sample ( file, single task, single table )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset"); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksDataSource,exg2host1.get_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksStart,"BirthDate"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exTasksEnd,"HireDate"); exg2host1.set_DataTechnology("Links","ADODB.Recordset;ADOR.Recordset"); exg2host1.set_DataSource("Links",exg2host1.get_DataSource("Items")); exg2host1.set_DataMember("Links","EmployeeLinks"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksDataSource,"Links"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksStart,"Start"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exLinksEnd,"End"); |
8 |
ADO sample ( tree recordset )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset"); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsID,"EmployeeID"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsParentID,"ReportsTo"); |
7 |
ADO sample ( flat recordset )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_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",exontrol.ADODB.CursorTypeEnum.adOpenStatic,exontrol.ADODB.LockTypeEnum.adLockOptimistic,0); exg2host1.set_DataSource("Items",(rsEmployees as ADODB.Recordset)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); |
6 |
ADO sample ( flat table )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataTechnology("Items","ADODB.Recordset;ADOR.Recordset"); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.accdb"); exg2host1.set_DataMember("Items","Employees"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); |
5 |
XML sample ( object, MSXML.DOMDocument )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_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"); exg2host1.set_DataSource("Items",(xml as MSXML2.FreeThreadedDOMDocument30)); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); var_G2antt.LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; var_G2antt.SingleSel = false; var_G2antt.AutoDrag = exontrol.EXG2ANTTLib.AutoDragEnum.exAutoDragPositionAny; |
4 |
XML sample ( file tree )
// Error event - Fired when an internal error occurs. private void exg2host1_Error(object sender,int Err,string Description) { System.Diagnostics.Debug.Print( Err.ToString() ); System.Diagnostics.Debug.Print( Description.ToString() ); } //this.exg2host1.Error += new exontrol.EXG2HOSTLib.exg2antt.ErrorEventHandler(this.exg2host1_Error); exg2host1.set_DataTechnology("Items","MSXML.DOMDocument"); exg2host1.set_DataSource("Items","C:\\Program Files\\Exontrol\\ExG2Host\\Sample\\sample.xml"); exg2host1.set_DataField(exontrol.EXG2HOSTLib.HostObjectFieldEnum.exItemsDataSource,"Items"); // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); var_G2antt.LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot; var_G2antt.SingleSel = false; var_G2antt.AutoDrag = exontrol.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 exg2host1_HostEvent(object sender,exontrol.EXG2HOSTLib.HostEventEnum EventID) { System.Diagnostics.Debug.Print( exg2host1.get_HostEventParam(-2).ToString() ); } //this.exg2host1.HostEvent += new exontrol.EXG2HOSTLib.exg2antt.HostEventEventHandler(this.exg2host1_HostEvent); exg2host1.HostReadOnly = exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostReadWrite | exontrol.EXG2HOSTLib.HostReadOnlyEnum.exHostAllowAddEmptyItem; // Add 'ExG2antt 1.0 Control Library(ExG2antt.dll)' reference to your project. exontrol.EXG2ANTTLib.exg2antt var_G2antt = (exg2host1.Host as exontrol.EXG2ANTTLib.exg2antt); var_G2antt.ScrollBars = exontrol.EXG2ANTTLib.ScrollBarsEnum.exVScrollEmptySpace | exontrol.EXG2ANTTLib.ScrollBarsEnum.exDisableNoVertical; exontrol.EXG2ANTTLib.Chart var_Chart = var_G2antt.Chart; var_Chart.set_PaneWidth(false,128); var_Chart.AllowCreateBar = exontrol.EXG2ANTTLib.CreateBarEnum.exCreateBarAuto; |
2 |
How do I handle events of the host
|
1 |
How can I get the version of the host/exg2antt control
System.Diagnostics.Debug.Print( exg2host1.Version ); System.Diagnostics.Debug.Print( "Host" ); System.Diagnostics.Debug.Print( exg2host1.Host.Version ); |