10112 : Is there a way to set the hour per day to a different value than 24?

…void buttonToggleHideTime_Click(object sender, System.EventArgs e)     {       timeHide=!timeHide;       if (timeHide)         dateScaler1.HideHours(new int[]{11,12,13});       else         dateScaler1.ShowHours(new int[]{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23});     } For further info look up PlexityHide.GTP.DateScaler.HideDays and PlexityHide.GTP.DateScaler.HideHours… Continue reading

10105 : I am using phGanttChart ActiveX in MFC application. I wish to store the GRID column number that was clicked for sorting. That I wish to remember the last sort… How do I do that??

and remember the column index. Implement IphGantX3.OnMouseDown, check that theSubComponent==gscGrid. Find the cell if any; You can do this with IphGantX3,GetGridCellRect(x,0, out aTop: OleVariant; out aLeft: OleVariant;                               out aBottom:… Continue reading

10813 : Is it possible to cancel OnGridCellChanged events?

…if (beforeFocusChange.OldFocusedCell!=null && beforeFocusChange.NewFocusedCell!=null)       {         if (beforeFocusChange.OldFocusedCell.Column.Index==2 && beforeFocusChange.NewFocusedCell.Column.Index==1)         {           // For some reason I do want the user to be able to move backwards from… Continue reading

10263 : Is there an easy way to rownumbers into a grid? This is easy when you only have rootnodes, but with a tree a becomes very complex…

…recursive strategy like this: public string GetIdentityOfNode(GridNode aNode) { if (aNode.ParentNode==null) { // this was a root node return the index return aNode.Index.ToString(); } else { return GetIdentityOfNode(aNode.ParentNode)+”.”+aNode.Index.ToString(); } }… Continue reading

10184 : How to select the item (row) in the grid that corresponds to an item in the gantt area that is selected ? (i.e in the same row)

and put some code there like: if (e.TimeItem.Selected)   Gantt.Grid.GridStructure.FocusedCell=e.TimeItem.GanttRow.GridNode.GetCell(0); In phGantTimePackage the event is called IphGantX3.OnSelectionChangedGantTime, and the code would look like this if (theDataEntity.Selected)   IphGantX3.GridCellFocusedY=(theDataEntity.Row.TreeNode as IphDataEntity_Tree3).GridRowIndex;… Continue reading

10210 : Progress in my timeitem

…e.TimeItem.TimeItemLayout.TimeItemStyle=TimeItemStyle.Square;       TimeItemDraw.Draw(e.G,e.TimeItem,e.Rect,e.TimeItem.Selected,e.TimeItem.TimeItemLayout);       e.TimeItem.TimeItemLayout.TimeItemStyle=TimeItemStyle.User;             if (e.TimeItem.UserReference is Double)       {                 System.Drawing.Point xy1=new System.Drawing.Point(e.Rect.Left,(int)(e.Rect.Top+e.Rect.Height/2));         System.Drawing.Point xy2=new System.Drawing.Point(xy1.X+(int)(((double)e.TimeItem.UserReference)/100*e.Rect.Width),xy1.Y);         e.G.DrawLine(new Pen(Color.YellowGreen,3),xy1,xy2);       }     }  … Continue reading