10547 : Change the cursor during a move operation dependent on the row under the TimeItem?

Question

Is it possible to change the cursor during a move operation dependent on the row under the TimeItem?

Answer

Sure,

Implement OnTimeItemAreaMouseMove,

check if the Gantt.MouseMoveKind==MouseMoveKind.move,

check what row you are over ; Gantt.GanttRowFromPoint

And when you have decided on an appropriate cursor, change it: Gantt.Cursor=myNewCursor

 

10415 : Automatic resize depending on TimeItemTexts

Answer

Is it possible to have a GridRow automatically resize itself by adjusting its height based on the biggest TimeItemText one of its TimeItem contains. Right now, the text is not always completely visible. If not is there a way to do this programmatically and how.

Question

This is currently not possible any easy way… Good point though…

I guess you could calculate the needed space for the time item texts by rendering them offscreen, and then adjust the row height to make sure they fit, but I cannot not help you with a sample at this time; sorry…

10426 : Tree lines in grid tree

Question

Hello guys. Is it possible to show root lines in the grid (I mean dotted line from root item to its child)? Thanks.

Answer

Ehh… We actually never implemented that in GTP.NET…. So no. Sorry… (If you want it bad enough you can create a custom cell and draw one cells tree-line-part). I will put it on the list for things to do. Thanks.

10406 : How can I show DateTime value in a GridCell in a custom format?

Question

Property GridColumn.Type = TimeDate allows to show DateTime value as date or as time, but is necessary for me both simultaneously. How can I show DateTime value in a GridCell in a custom format?

Answer

Depends on how you want to edit the cell… If you can suffice with a string editor I would treat the field as a string. If you have a special editor like a date+time picker I would go for a CustomCell class and implement the OnCustomCellEditStartByKey etc…

10389 : GTP.NET.WEB paging

Question

Im using PlexityHide GTP.NET.WEB.
I face an issue on Paging.
For example, i set the page size= 5.
My total record to show in the grid is 10 rows of records.

The result expected is 2 pages with 5 rows record per page.
But i get the 3 pages record with
1 page – 5 records
2 page – 5 records ( the 1st record from Page 2 is duplicate from the 5th record from the 1st page)
3 page – 1 records

i try to change the page size to 10.
the result is 2 pages.
1 page – 10 records.
2 page – 1 rec

Answer

Yes, confirmed. This was a bug in the Gantt_ASP class. It is now fixed (2.2.1.0) and can be dowloaded from here: https://plexityhide.com/pub/PlexityHide.GTP.zip
https://plexityhide.com/pub/PlexityHide.GTP.WEB.zip

NOTE this is for CLR 1.1; for CLR 2.0 (VisualStudio 2005):

https://plexityhide.com/pub/PlexityHide.GTP.CLR20.zip
https://plexityhide.com/pub/PlexityHide.GTP.WEB.CLR20.zip (at the time of writing GTP.WEB.CLR20 is not available, but it will be very soon)

10392 : Can you have horizontal lines across the Gantt chart? Our users do not want Pyjama alternative colours but have requested horizontal lines to distinguish rows.

Question

I posted a Question half a year ago:

Can you have horizontal lines across the Gantt chart? Our users do not want Pyjama alternative colours but have requested horizontal lines to distinguish rows.

The answer was: draw a line using GDI. We did this, but there are difficulties with printing. You have to make a (nonlinear) correction for vertical line distances for different rowheights, for the report to display the same as the monitor-gantt. Also big problems arise when you have different rowheights within one ganttchart.

The reason why many user prefer horizontal lines is clear: as a black/white print output it is clearer and saves ink.

Will you offer horizontal lines as a standardfeature in future, as an alternative to pyjamas?

Answer

Sure we could extend the API to allow for row separating lines, but if there are issues with positioning user drawn things when printing we would like to fix it. Chances are that there is some simple mistake in your current code. Can you send me a sample showing the problems you have with printing and positioning of your user drawn lines and I will take a look at it…

10364 : Is it possible to draw a dotted line at any other user specified dateTime?

Question

In GTP.NET by specifying Gantt.today=true draws a dotted line at DateTime.Now is it possible to draw such a dotted line as any other user specified dateTime other than at now

Answer

Implement the OnTimeItemAreaPaintBackground event, here you are free to draw anything you want. Then use the Gantt.DateScaler.TimeToPixel to turn your specific date into a pixel value… Remember to check the ScheduleMode property to decide if you should draw a horizontal or vertical line

 

10366 : Color of todayline

Question

Is there a possibility to make the today line appear in a different colour. A gantt chart is nothing if you dont see where today is directly. Please help me out I want to give a presentation whith our product and this functionality is very imortant. TIA

Answer

Currently a property to control the color of the today line is not exposed, partly because it is so very easy to draw your own things in the gantt background just by implementing the OnTimeItemAreaPaintBackground event…

New 0611: New property on the Gantt.TodayLineColor…. Download latest patch.

This is how the current today line is implemented (Add this code like this in the OnTimeItemAreaPaintBackground and elaborate):


      if (TodayLine)
      {
        if (DateScaler.StartTime<DateTime.Now && DateScaler.StopTime>DateTime.Now)
        {
          HatchBrush hatchBrush=new HatchBrush(HatchStyle.Percent50,Color.Black,TimeItemArea.BackColor);
          Pen pen=new Pen(hatchBrush,1);
          int x=DateScaler.TimeToPixel(DateTime.Now);
          if (TimeItemArea.FlipView)
            G.DrawLine(pen,TimeItemArea.CalcLeft,x,TimeItemArea.CalcWidth,x);
          else
            G.DrawLine(pen,x,TimeItemArea.CalcTop,x,TimeItemArea.CalcBottom);
        }
      
      
      }

10353 : Reacting to changes of the datescaler

Question

We(www.rostima.com) are evaluating your software and wish to know if the date scalar can be bound to a .net data grid the way the time-items have been bound to a data-grid on the left side…we would like to have an additional grid bound at the bottom of the timeitem area so that we should have a summary(day/month/quarter) wise within this grid which scales in sync with the date scalar…your component does most ot the things except this and we wished to know if this would be an available feature or if code of doing this could be made available.

Answer

You can bind to the Start and Stop properties of the DateScaler, or simple implement the OnScaleChangeEvent to update the content of such a grid. You would then need to apply your business logic to decide what the new content of that grid should be (here we have automatic functionality)