10936 : Is it possible with the GTP.Net component to import MS Project “.mpp” file ?

Question

Is it possible with the GTP.Net component to import MS Project “.mpp” file ? if not, is-it possible to extract data from it and recreate a Gantt diagram editable ??

 

Answer

 

< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

No, sorry, GTP.NET does not read .mpp files. The workaround is to use the xml format from MsProject, read it into a dom and iterate and populate either the Gantt directly via the API, or populate the datasets and bind those to the Gantt.

 

Once you have populated the Gantt everything is editable by graphical manipulation.

 

10935 : How can I configure the gantt visualization to make it more attractive?

Question

How can I configure the gantt visualization to make it more attractive? For example Xtracharts , there default GUI look so attractive (but they dont support full Gantt function like yours) Is there any way to configure it colorfull like that?

Answer

The abilities to change the look of the GTP.NET are endless.

To Start with TimeItems:
To fill the time item we offer some styles out of the box with gradient behavior ;by setting properties like Color, GradientColor, FrameColor, BrushKind (Important!) and TimeItemStyle to Modern1, Pipe or Glossy you can do very much with little effort.< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

And if that is not enough you implement UserDrawn time items.

 

To do the background we also offer UserDraw events like  OnTimeItemAreaPaintBackground. Combined with methods like TimeToPixel you can do time dependent backgrounds any way you need.

 

 

10728 : I would like to a gantt inside an automatically generated PDF (using sharpPDF).

Question

I would like to insert a gantt inside an automatically generated PDF (using sharpPDF).

My current solution is to gantt.PrintPage() into a bitmap-backed System.Drawing.Graphics. Then insert this bitmap inside the PDF. It works but it’s bitmap based, so it’s quite ugly when zooming.

Is there a way to divert the call to the Graphics object into a specially crafted “VirtualGraphics” that would act as a proxy (glue layer) to the PDF library ?

Or is there an other solution that could be able to insert a vectorized version of GTP inside a PDF without any user interaction ?

Answer

You can do exactly as you do now, but use a MetaFile instead of a Bitmap. Metafile (saves as wmf or emf) is vector based and you can think of it as the “microsoft-postscript-implementation”. Meta file sample found here

 

10744 : I have use two layers in every gantt row, how can I sync movement of time items?

Question

I have use two layers in every gantt row. One layer for showing task timeitem and other for progress timeitem together with no. of days of progress label value in that time item. Now the problem is that if i move timeitem of first layer in same row at right side, I also want to move timeitem of second layer so that it takes start time of timeitem of first layer. Also how to retrieve start time of timeitem of one layer when the user resize the timeitem of another layer.

Answer

Many possible ways. The best solution is to use a Invisble time item link and set up a TimeItemLinkAction with the value SameStart, that will fix it.

Sample showing how to set up some LinkActions:

      gantt1.Grid.RootNodes[2].GetCell(0).Content.Value=“Third row, use link action, and invisible link”;
      gr=GanttRow.FromGridNode(gantt1.Grid.RootNodes[2]);
      til1=gantt1.TimeItemLinks.AddLink(gr.Layers[0][0],gr.Layers[0][1]);
      til2=gantt1.TimeItemLinks.AddLink(gr.Layers[0][1],gr.Layers[0][2]);
     
      til1.Action=TimeItemLinkAction.PushForward;
      til2.Action=TimeItemLinkAction.PushForward;     
      til1.TimeItemLinkDrawStyle=TimeItemLinkDrawStyle.Invisible;
      til2.TimeItemLinkDrawStyle

10913 : Is there a way to define the height so that all elements are displayed?

Question

Web application using Gantt_ASP

is there a way to define the height so that all elements are displayed?
Or is there a command that tells if an element is not displayed?

I have a gantt that is connected to a database, so the size of the gantt could be very large, or very small. Is there a way to check how big the gantt should be?

Gantt_ASP.height = node.row1 + rode.row2…….. + header ???
or is there a way to check that a node is displayed?

Answer

You can check the Gantt.Grid.GridStructure.LastDrawnNode property. You can check the rectangle of a cell of this node.< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

To make sure you are working with current data you should call Gantt.Grid.Refresh() before checking the LastDrawnNode.

 

10755 : Cant use the samples.

Question

Can’t use the samples. I tried to open the GTP.NET sample for Visual Studio 2003 VB.NET. When opening the vbproj file, the system states that several names are not a member of Plexihide.GTP. …

How can I solve this problem?

Answer

We are constantly updating the GTP.NET and in this case the assembly that the sample is trying to use is non existent or to old.

1. In the solution explorer, fold down references.
2. Find the PlexityHide.GTP and delete it, if you cant find it that is fine to.
3. Right click “References” and choose “Add Reference”
4. In the “Add reference” dialog choose “browse”
5. Locate the PlexityHide.GTP assembly in your install folder and the CLR11 (C:\Program Files (x86)\plexityHide.com\GTP.NET 2.3\CLR11)
6. Ok the dialog and the assembly is added.
5. F5 and run

10823 : how to handle the mouseEnter and mouseLeave events for the time item?

Question

How to handle the mouseEnter and mouseLeave events for the time item. Actually i want to change the color of timeitem when mouse entered and again apply the previous color when mouse leaves

Answer

Implement the event OnTimeItemAreaMouseMove. In this event look up the timeItem currently under the mouse with Gantt.TimeItemFromPoint.

Remember the result in a member variable, beware that the result might be null (mouse currently not over any time item) .

If the member variable with the time item changes value, then the old time item should get its default time item layout back: _oldRemeberedTimeItem.TimeItemLayout=DefaultTimeItemLayout, and the new value should be given a TimeItemLayout that represent “Mouse is over me”.

It is not an uncommen mistake to change the TimeItemLayout’s values, and thus changing the look for all time items with that time item layout. You should of course change the time items so that it points to a different time item layout to get the desired effect of only changing one time item.

10722 : How can I stop ing a TimeItem when user drags the TimeItem into a Time item area which is designated as a holiday or non-working area.

Question

I am using GTP.NET

How can I stop droping a TimeItem when user drags the TimeItem into a Time item area which is designated as a holiday or non-working area.

I have used “OnTimeItemAreaScalerPaintBackground” event to paint holidays and non-working days in different colour. I do not want users to drag the time items into those areas.

Thank you.

Answer

You probably do not want to stop the drag over since it would irritate the user, but you can send visual feedback when the user is over a forbidden area. You can do this by changing the TimeItemLayout of the moving time item in the OnTimeItem_Hoover event: “Fired while mouse is moved and possibly over a time item. This is a good place to set e.Allow false if you do not want to allow the ongoing operation. You can also limit dragging in this event by e.x=gantt1.MouseDownPoint.X; will stop move in x direction ”

When the user actually drop the time item you can check that it is ok in the OnTimeItem_Move event. If it is not ok just set e.Allow=false and it will jump back.