This is a migrated thread and some comments may be shown as answers.

Gantt View more columns

13 Answers 226 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Cecilia
Top achievements
Rank 1
Cecilia asked on 23 Apr 2012, 03:53 PM
Hi,
I am working with the Gantt but i have some doubts and i wonder if someone could help me.

Number 1:      I want to put in the table that it is in the gantt, more columns. I dont need to show the data in the graphic but i need that the user see them in the left table near the columns End and Start. For example the person that is asign to the project, or the coordinator. I see that the class "GanttTask" only can be invoque with this parameters..

public

GanttTask(DateTime start, DateTime end);

 

public GanttTask(DateTime start, DateTime end, string title);

public GanttTask(DateTime start, DateTime end, string title, IEnumerable<IRelation> relations);

It is possible to put more columns??

Number 2:      Also i need to know if i could change the name title to my Gantt, because if i have this code i have the columns title and then de other Project Name

TITLE || Project Name || A/ETA || A/ETS

<Grid x:Name="LayoutRoot">

 <telerik:RadGanttView x:Name="ganttView" FontFamily="Comic Sans MS" TasksSource="{Binding Tasks}" HighlightedItemsSource="{Binding HighlightedTasks}" >

 <telerik:RadGanttView.Columns>

<!--<telerik:ColumnDefinition MemberBinding="{Binding NumOper}" Header="Num Op." ColumnWidth="90" />-->

<telerik:ColumnDefinition MemberBinding="{Binding Title}" Header="Project Name" ColumnWidth="300"/>

<telerik:ColumnDefinition MemberBinding="{Binding Start}" Header="A/ETA" ColumnWidth="160" />

<telerik:ColumnDefinition MemberBinding="{Binding End}" Header="A/ETS" ColumnWidth="160" />

 </telerik:RadGanttView.Columns>

 </telerik:RadGanttView>

 </Grid>

 

Number 3:      And the last one, can I change the bars and put some image? 
 
Thanks a lot!!!!!!!!!






13 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 25 Apr 2012, 01:51 PM
Hi Cecilia,

About question number 1 - what exactly do you need to achieve - to add more data to the GanttTask or just to show more columns in the grid area? To add more columns you need to add more columns to the Columns property of the RadGanttView control and to add more data to the GanttTask object you might prefer inheriting or creating a brand new implementation of the IGanttTask interface.

2. I'm not sure which title you need to change and if you want to change the title of the tree view you might add a new column of type TreeColumnDefinition and to set title to it. If this doesn't help you, please send us a screenshot which points which text you want to change.

3. Could you please specify which bars would you like to change?

Regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Cecilia
Top achievements
Rank 1
answered on 02 May 2012, 03:31 PM
0
Cecilia
Top achievements
Rank 1
answered on 02 May 2012, 03:41 PM
Thanks for your replay!

1 - what exactly do you need to achieve - to add more data to the GanttTask or just to show more columns in the grid area? To add more columns you need to add more columns to the Columns property of the RadGanttView control and to add more data to the GanttTask object you might prefer inheriting or creating a brand new implementation of the IGanttTask interface.


I am still working in this point! I need to show more columns in the grid area. But i dont know how to binding..

<telerik:RadGanttView.Columns>
<!--<telerik:ColumnDefinition MemberBinding="{Binding NumOper}" Header="Num Op." ColumnWidth="90" />-->
<telerik:ColumnDefinition MemberBinding="{Binding Title}" Header="Project Name" ColumnWidth="300"/>
<telerik:ColumnDefinition MemberBinding="{Binding Start}" Header="A/ETA" ColumnWidth="160" />
<telerik:ColumnDefinition MemberBinding="{Binding End}" Header="A/ETS" ColumnWidth="160" />
</telerik:RadGanttView.Columns>
</telerik:RadGanttView>
</Grid>

MemberBinding="{Binding NumOper}"
In the </ telerik: RadGanttView.Columns> I created a column more:

<telerik: ColumnDefinition MemberBinding = "{Binding} NumOper" Header = "Num Op" ColumnWidth = "90" />

But I do not know how to fill it with data. How should I make the binding? The data I have it in the cs but do not know how to display it.


2. I'm not sure which title you need to change and if you want to change the title of the tree view you might add a new column of type TreeColumnDefinition and to set title to it. If this doesn't help you, please send us a screenshot which points which text you want to change.
Thks! Changing the type to TreeColumnDefinition works perfectly!


3. Could you please specify which bars would you like to change?
I want to change the color of each task. Put a different color to each task in the Gantt according to a standard specified by me. Is it possible?

4- Can i change the display of the progress, maybe put in the GanttTask two diferrent colors? or make bigger the line? Because it is very small in the GanttView (Chart) and it is important in my project to show the progress.

<telerik:ColumnDefinition MemberBinding="{Binding Progress}" Header="Progress" ColumnWidth="100">

<telerik:ColumnDefinition.CellEditTemplate>
<DataTemplate>
<telerik:RadNumericUpDown Value="{Binding Progress, Mode=TwoWay}" CustomUnit="%" Minimum="0" Maximum="100" />

 </DataTemplate>

 </telerik:ColumnDefinition.CellEditTemplate>

 </telerik:ColumnDefinition>

 
Thank you so much !

0
Miroslav Nedyalkov
Telerik team
answered on 03 May 2012, 08:54 AM
Hello Cecillia,

1.Bindings should be exactly as the bindings in the First Look demo of the GanttView - {Binding YourProperty}, where YourProperty is the property of your custom GanttTask. Please notice that you need to create a custom GanttTask to add your custom properties you'd like to bind to. The easiest way to do this is to inherit from the GanttTask class.

3. The best way to do this is to create an implicit style for the containers of the items. For each GanttTask which is not a summary or a milestone is created an EventContainer UI element (the blue items from the First Look example), a MilestoneContainer is created for each milestone (the purple elements) and a SummaryContainer - for each summary task (the green ones).

4. To achieve this you need to change the ControlTemplate of the EventContainer and make the rectangle, used as a progress bar inside it bigger.

Hope this helps.

All the best,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Keith
Top achievements
Rank 1
answered on 06 Jun 2012, 12:08 PM

GanttTask contain three Collection startdate,endDate and Title and xaml got this properties UniqueID,Title,Start,End,Duration,Progress,IsMilestone and description

I have create a column but now the value that I enter in that column doesn't display until I bind it to this xaml properties
1. what are other xaml properties that I can use except those I just mention
2.is there any way I can make GanttTask have more that 3 elements

0
Miroslav Nedyalkov
Telerik team
answered on 06 Jun 2012, 04:16 PM
Hello Edward,

The answer to this question is posted here.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Keith
Top achievements
Rank 1
answered on 08 Jun 2012, 10:58 AM
Hi Miroslav
Thanks Miroslav , now how do I Add a new task as it is easy with a child task,  I got a button add task in my interface and it should insert a new row below as parent task so that i will able to add child task to it
0
Miroslav Nedyalkov
Telerik team
answered on 08 Jun 2012, 12:35 PM
Hi Edward,

This problem was fixed and the fix will be included in the 2012 Q2 release which is expected next week. Hope this time frame is good for you.

Regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Cecilia
Top achievements
Rank 1
answered on 11 Jul 2012, 09:49 PM
Hi Miroslav Nedyalkov ,

I have a doubt, I want to change the width of the columns that display the days of the month in the Gantt.
This is possible??

Thks a lot for all the help.
0
Miroslav Nedyalkov
Telerik team
answered on 12 Jul 2012, 07:34 AM
Hi Cecillia,

To change the Width of a column you just need to set the ColumnWidth property of the ColumnDefinition that describes this column.

Hope this helps.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Cecilia
Top achievements
Rank 1
answered on 12 Jul 2012, 03:07 PM
Hi Miroslav,
Thanks for your replay, but....

This is my code..

<Grid x:Name="LayoutRoot">

 <telerik:RadGanttView x:Name="ganttView" FontFamily="Comic Sans MS" TasksSource="{Binding Tasks}" HighlightedItemsSource="{Binding HighlightedTasks}" >

 <telerik:RadGanttView.Columns>

     <telerik:TreeColumnDefinition MemberBinding="{Binding Title}" Header="WORK" ColumnWidth="260"/>

 </telerik:RadGanttView.Columns>

 

</telerik:RadGanttView>

 </Grid>

 


and it doesnt allow me to set the columnWidth to the columns that display the days of the month in the Gantt.
For example my Gantt display:

                    JULY
                    02   |   03   |   04   |   05   |   06   |   07   |   08   |
WORK                               ---------------------------

And i want to change the width of the columns that display the days of the month of the GanttView (02, 03, 04, 05, 06 ,07 ,08), not the width of the column "WORK".


Thanks a lot!!
Cecilia

 

 

 

 

0
Miroslav Nedyalkov
Telerik team
answered on 13 Jul 2012, 11:10 AM
Hello Cecillia,

I'm sorry, but I didn't understood you correctly the first time. To change the size of the days you need to change the PixelLength property of the GanttView control. It works the following way - you set a time span which corresponds to one pixel from the screen. For example if you want one day to be rendered as 30 pixels you set the pixel length to be 1/30 of a day (which is 48 minutes). This property is of type TimeSpan.

Hope this helps.

Regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Neftaly
Top achievements
Rank 1
answered on 30 Sep 2014, 08:17 PM
I have a problem whit IE when I try to see my gantt.... with others browsers like safari, opera, chrome and mozilla looks right, except in internet explorer... what is the problem?
Tags
GanttView
Asked by
Cecilia
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Cecilia
Top achievements
Rank 1
Keith
Top achievements
Rank 1
Neftaly
Top achievements
Rank 1
Share this question
or