10005 : What events can be caught from the gantt chart when using GTP.NET on an ASP page?

Question

What events can be caught from the gantt chart when using GTP.NET on an ASP page?

OnTimeItem_Hoover(), OnGridDoubleClick etc are only available for Windows forms?

I understand that these are more easily available in a windows form since all the logic is performed on the client side, but is there a way of handling these events from the browser?

Resolution

Most of the logic behind such user interaction events must be performed in the browser. The event OnAreaAttributes gives you the possibility to inject your own client side events and call your own script code.

Sample:

    private void Gantt_ASP1_OnAreaAttributes(PlexityHide.GTP.WEB.Gantt_ASP aGantt, PlexityHide.GTP.WEB.AreaAttributeEventArgs e)
    {
      if (e.AreaKind==PlexityHide.GTP.WEB.AreaKind.TimeItem)
      {
       
        e.Result=” Title=\”You are now over a time item\” onMouseOver=\”self.status=’Hey man, your are over a time item’;return true\” “;
      }
      else
      if (e.AreaKind==PlexityHide.GTP.WEB.AreaKind.TimeItemRow)
      {
        e.Result=” Title=\”Click this one if you are happy\” onMouseOver=\”self.status=’YOU ARE NOW ON THE ROW, and not over a time item’;return true\” “;
      }
      else
      {
        e.Result=” onMouseOver=\”self.status=’—‘;return true\” “+e.Result;
      }

    }

 

Leave a Reply