Katalogerna
PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


phGantTimePackage FAQ 10390


How I can find a timeitem by uservariantreference ? Please note that this article refers to the phGantTimePackage
Jump to article- 2006-12-09 12:14:00 - Email plexityHide

Question

How I can find a timeitem by uservariantreference ?

Answer

You will need to iterate thru the Gantt chart like this in c#:

 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;
        if (aGantTime.UserVariantReference==THEONEIMLOOKINGFOR)
        {
       
}
      }
    }
  }

Or in VB (the code snippets does not do it the exact same way, this code use the RowList...):
    For i = 0 To phGantX1.RowList.Count - 1  ' loop over all gantt rows
        For ii = 0 To phGantX1.RowList.GantRow(i).DataLists.Count - 1 ' loop over all layers in gantt row
            For iii = 0 To phGantX1.RowList.GantRow(i).DataLists.DataList(ii).Count - 1 'loop over all time items
                Set ti = phGantX1.RowList.GantRow(i).DataLists.DataList(ii).Items(iii)
if ti.UserVariantReference=THEONEIAMLOOKINGFOR then


End if
            Next iii
        Next ii
    Next i

 

 

Google
WWW plexityHide phGantTimePackage FAQ
Support

Support intro

Knowledgebase

FAQ phGantTimePackage

FAQ GTP.NET

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...