PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


phGantTimePackage FAQ 10168


I would like to modify the properties of time items once they have been displayed. Please note that this article refers to the phGantTimePackage
Jump to article- 2005-05-06 11:46:00 - Email plexityHide

Question

I am using your Gant Time Package, and I would like to modify the properties of time items once they have been displayed. I could not find how to get one, even when giving them a UserIntegerReference.
Could you please tell me how to get a reference to these items.

Thank you.

Answer

The object model of the phGantTimePackage has tree nodes, gantt rows, layers and time items. To successfully navigate thru these items you will be helped by this complete iteration sample:

private void buttonIterate_Click(object sender, System.EventArgs e)
{
  // Iterate everything in the Gantt; Add an X to each tree node and move each time one day...
  // Tree items
  for(int i=0;i<axphGantX1.DataEntityList2LevTree.Count();i++)
  {
    phGantXControl.IphDataList aList=axphGantX1.DataEntityList2LevTree.get_DataList(i);
    for(int ii=0;ii<aList.Count();ii++)
    {
      phGantXControl.IphDataEntity_Tree2 aTreeItem=aList.get_Items(ii) as phGantXControl.IphDataEntity_Tree2;
      aTreeItem.Text=aTreeItem.Text+"x";
      for(int iii=0;iii<aTreeItem.GantRow.DataLists.Count();iii++)
      {
        phGantXControl.IphDataList aDrawingLayer=aTreeItem.GantRow.DataLists.get_DataList(iii);
        for(int iiii=0;iiii<aDrawingLayer.Count();iiii++)
        {
          phGantXControl.IphDataEntity_GantTime2 aGT=aDrawingLayer.get_Items(iiii) as phGantXControl.IphDataEntity_GantTime2;
        }
      }
    }
  }
  // Another quicker way to get hold of all the time items
  for(int i=0;i<axphGantX1.DataList3levGantTimes().Count();i++)
  {
    phGantXControl.IphDataList2lev aList2Lev=axphGantX1.DataList3levGantTimes().get_DataList2Lev(i);
    for(int ii=0;ii<aList2Lev.Count();ii++)
    {
      phGantXControl.IphDataList aList=aList2Lev.get_DataList(ii);
      for(int iii=0;iii<aList.Count();iii++)
      {
        phGantXControl.IphDataEntity_GantTime2 aGantTime=aList.get_Items(iii) as phGantXControl.IphDataEntity_GantTime2;
        aGantTime.Start=aGantTime.Start.AddDays(1);
        aGantTime.Stop=aGantTime.Stop.AddDays(1);
      }
    }
  }
        }

 

Google
WWW plexityHide phGantTimePackage FAQ
Support

Support intro

Knowledgebase

FAQ phGantTimePackage

FAQ GTP.NET

FAQ GTP.NET.SL and WPF

FAQ general

Testimonials

"This is too GREAT. I must say you have strong support and really good programmers at your place. Your entire team is good. Just Fantastic! – 100%"
Gaurav Patole,
WebTechDevelopers
More testimonials...




/" class="blk">PlexityHide.com
Grastensvagen 24, S-163 45 Spanga Sweden
E-mail: support@plexityhide.com