Katalogerna
PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


GTP.NET FAQ 10904


I want to allow a user to move a timeitem between rows, but not to change the time Please note that this article refers to the GTP.NET
Jump to article- 2007-05-17 11:38:00 - Email plexityHide

Question

I?m using the gantt control with ASP.NET. I want to allow a user to move a timeitem between rows, but not to change the time ? just move it to another row at the same time as it was before being moved.  Is there a way to do this?

I think if the OnClientSideChangesApplied event returned a TimeItemEventsArg instead of just a plain event, it would be more helpful.

Answer

Actually you can do this in Gantt_ASP just the same way you would do it in windows forms:

In the pageLoad add this:

Gantt_ASP1.Gantt.OnTimeItem_Move += new TimeItemEvent(Gantt_OnTimeItem_Move);

and then implement the event like this:

  void Gantt_OnTimeItem_Move(Gantt aGantt, TimeItemEventArgs e)
  {
    if (e.NewGanttRow!=null && e.NewGanttRow!=e.TimeItem.GanttRow)
    {
      // The user wants to switch rows...
      //Ok, but lets zero the time move...
      e.Diff=TimeSpan.Zero;
    }
  }

You will need version 3.0.5.17 and above to get this to work smoothly

 

Google
WWW plexityHide GTP.NET 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...