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

Hide or Collapsed GanttView GanttViewElement TextViewElement

3 Answers 55 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Jo
Top achievements
Rank 1
Jo asked on 09 Jul 2014, 10:50 AM
I used the 2014 Q2 winforms version of ganttview.

I don't know how to make cell elements to readonly.
So I decided to just hide and don't show the TextViewElement.
But when I set GanttView.GanttViewElement.TextViewElement.Visibility to Collapsed, it behaves just like setting it to Hidden.

My view on setting visibility to hidden is that the space allocated for a certain element is still reserved
while collapsed makes the space available for other elements.

I would like to know how will I properly collapse TextViewElement so that GanttView will only show the GraphicalViewElement.

Attached image is a sample of a collapse TextViewElement.

3 Answers, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 2
answered on 14 Jul 2014, 02:08 AM
i encountered same problem, how to hide or collapsed the TextViewElement, any work around, i need to show the GraphiclViewElement only.
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 14 Jul 2014, 08:38 AM
Hello guys, 

Thank you for writing.

It is possible to make the cell element read only by cancelling the GanttViewElement.ItemEditing event:
private void GanttViewElement_ItemEditing(object sender,
    GanttViewItemEditingEventArgs e)
{
    e.Cancel = true;
}

As to the question, related to collapsing the TextViewElement, it is necessary to set the Ratio to 0:
this.radGanttView1.GanttViewElement.TextViewElement.Visibility =
    Telerik.WinControls.ElementVisibility.Collapsed;
this.radGanttView1.Ratio = 0;

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Daniel
Top achievements
Rank 2
answered on 14 Jul 2014, 08:54 AM
Thank you Desislava
Tags
GanttView
Asked by
Jo
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 2
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or