10592 : Collisiondetection placement

Question

When there is a collision between DateTime items they get arranged one above the other – this is good, however the arrangement (which is shown above and which is below) can change as you zoom and pan. Have you noticed this? Can this be prevented in any sensible fashion? What about a tag or id or something that we could set to force an order – this could be used, as well, to control what the drawing order is when automatic collision detection is not used (if there is not already a means of doing this?

Answer

In the latest version of GTP.NET we use a rule that makes the placement more distinct. We always place the earliest time item in top column, and then they are arranged according to their start date. If you need a different order it is good to know that you can control this placement by setting the SubCol value of the time item. You can also use the event OnCollisionDetect and set the TimeDistinctItems DistinctPosition to control the assigned subcol value.

10595 : How can I put a scrollbarcolumn in my grid on gantt_asp?

Question

I’m using GTP_asp in web.
How can I put a scrollbarcolumn in my grid on gantt_asp?

Answer

The Gantt supports paging that will split up long dataranges over several pages with page numbers at the bottom of the Gantt.

But if you do not want to page your data but rather scroll it you can do so by enclosing the Gantt_ASP in a scrolling div.

A scrolling div looks like this:

<div style=”border : solid 2px #ff0000; background : #000000; color : #ffffff; padding : 4px; width : 200px; height : 50px; overflow : auto; “>
<Gantt_ASP>
</div>

10658 : How can i know the order user click on the time item?

Question

How can i know the order user click on the time item? I found out that u sort GetSelectedTimeItems by date. Please help. I need it urgently.

Answer

We do not store the order of the selections, I do not think we order the GetSelectedTimeItems for that matter. But you can implement OnTimeItem_SelectionChanged and keep your own collection of selected items.

Just add the e.TimeItem to the collection if e.TimeItem.Selected==true, otherwise remove it from the collection.

10541 : Fill one paper

Question

Is there a way with the GTP.Net version to make the gantt fill one page only? For example, if I have 100 rows in the Gantt chart I need them to all print on one page. I have worked with the scaling and the examples that are on your website but I have not found a solution yet.

 

Answer

 

A bit if a hack but why not make a loop and print with decreasing scale until you get HasMorePages==false< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

 

 

10512 : Can we drill down on any bar in the gantt chart?

Question

Can we drill down on any bar in the gantt chart?

Answer

If the question is “Can we catch all possible events on a time item” the answer is yes. The term “drill down” implies that there is data “under” this time item, and there probably is, but that is up to you to decide what that data is. Our components merly offer you a clean way to make changes and presentation to the data you provide.

10414 : Changing mousecursor in Gantt_ASP

Question

Im using the _gantt_OnAreaAttributes() method to set up event handlers inside e.Result for the items on the gantt chart according to their e.AreaKind.

If I leave e.Result as it is then the item appears with the mouse cursor as a “hand” and causes a post back when you click the item. 
Is there something I can put in the e.Result to manipulate the mouse cursor type?

Answer

I thought that this should be as easy as:


    private void Gantt_ASP1_OnAreaAttributes(PlexityHide.GTP.WEB.Gantt_ASP aGantt, PlexityHide.GTP.WEB.AreaAttributeEventArgs e)
    {
      if (e.AreaKind==AreaKind.TimeItem)
      {
        e.Result+=" onmouseover=\"this.style.cursor='crosshair';return true;\" "; // add a cursor switch in mouse over
      }
    }
But I cannot get it to work, and I cannot really understand why. I think this is some browser limitation.
If I set this code in the img tag itself it will change the cursor, but it seems like IE6 will not run onMouseOver's for image maps.
So Sorry, cannot not currently help you. If you figure anything out please let me know...

10421 : What is the source code which is offered in the $ 1,899.00 package?

Question

What is the source code which is offered in the $ 1,899.00 package (1 Developer License for GTP.NET)? Are they sample codes on how GTP.NET components are used?

Answer

The source code to all samples are included in every licensing scenario.

The source code in the Source code license is the complete c# code to the GTP.NET. This license enables you to build the GTP.NET yourself and debug into GTP.NET. You can fix bugs (we strongly recommend you to coordinate local changes with support), or add your own extensions (not recommended since you loose many of the benefits with allowing us to handle all maintainance and development). Many companies license the source as an insurance for future events.

10411 : How do I make sure my ganttrow is visible for the user?

Question

We’re using plexityHide Gantt 1.3. How do I make sure my selected ganttrow is visible for the user? I’m able to select to row but not to scroll/navigate to it so it’s visible for the user.

Note: The timeItem is not selected by the user in the gantt.

/////////////
_selectedTimeItem = tmpTi;
//Expand selected parent node
GridNode gn = _selectedTimeItem.GanttRow.GridNode;
if (!gn.ParentNode.Expanded){
 gn.ParentNode.Expanded = true;
}
this.Grid.GridStructure.ClearSelections();
gn.RowSelected = true;

Answer

In version 1.3 you will need to set the Gantt.Grid.Gridstructure.TopNode property to the desired node… If it is the last node this will look a bit strange so you might want some logic to set Gantt.Grid.Gridstructure.TopNode to a more appropriate value.

If you upgrade to 2.x you simply call gn.MakeSureVisible().

In 2.x you also have MakeSureVisible calls on TimeItems and cells.

10401 : With Gantt, is there a simple way to make TimeItems read-only i.e. a user cant move them?

Question

With Gantt, is there a simple way to make TimeItems read-only i.e. a user cant move them?

Answer

Yes. each TimeItem has a TimeItemLayout (you may re-use timeItemLayouts to several timeItems). In the TimeItemLayout set these properties:
AllowChangeRow=false
 AllowChangeRow=false
 AllowLinkReAssignStart=false
 AllowLinkReAssignTarget=false
 AllowLinkSelectionStart=false
 AllowLinkSelectionTarget=false
 AllowMove=false
 AllowResizeEast=false
 AllowResizeWest=false

As you see the granularity to control what a user is allowed to do or not is high.