Question

(As you can see in the provided image, the timeblocks are empty.)

https://i.stack.imgur.com/gnIqf.png

(Expected Result)

https://i.stack.imgur.com/KcoYo.jpg

Hello everybody. So I tried to replicate the the sample CarRental I'm succesfull at importing events from the database but I can't show no other than TimeMarkArea.

Thanks in advance for any help you are able to provide.

Was it helpful?

Solution

Thank you for posting this question. First and foremost the terminology you are using is wrong. You are referring to TimeLine Tiers and not TimeBlocks.

Here's an image that shows the difference between the two:

difference between TimeLine tiers and TimeBlocks in the ActiveGantt Scheduler Component

You have not posted any code, but as this is a very common issue, I can imagine that the problem is that when you copied the code you did not override:

    private void ActiveGanttCSNCtl1_CustomTierDraw(object sender, AGCSN.CustomTierDrawEventArgs e)
    {
        if (e.Interval == E_INTERVAL.IL_HOUR & e.Factor == 12)
        {
            e.Text = e.StartDate.ToString("tt").ToUpper();
        }
        if (e.Interval == E_INTERVAL.IL_MONTH & e.Factor == 1)
        {
            e.Text = e.StartDate.ToString("MMMM yyyy");
        }
        if (e.Interval == E_INTERVAL.IL_DAY & e.Factor == 1)
        {
            e.Text = e.StartDate.ToString("ddd d");
        }
    }

If you look at the load event for the form, when you are adding the view:

oView = ActiveGanttCSNCtl1.Views.Add(E_INTERVAL.IL_MINUTE, 30, E_TIERTYPE.ST_CUSTOM, E_TIERTYPE.ST_CUSTOM, E_TIERTYPE.ST_CUSTOM);

The Tier types are all set to custom. This is the documentation for the Add Method.

http://www.sourcecodestore.com/Documentation/Topic.aspx?PN=AG&PL=CSN&LID=1453

And this is the documentation for the CustomTierDraw event:

http://www.sourcecodestore.com/Documentation/Topic.aspx?PN=AG&PL=CSN&LID=274

If the TierType is set to E_TIERTYPE.ST_CUSTOM the control will invoke the CustomTierDraw event when drawing captions for the Tier object. If the CustomTierDraw is not overridden then the tiers will have no caption and they will show up as blank.

Best Regards,

Julio Luzardo

http://www.sourcecodestore.com

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top