Hide or Collapsed GanttView GanttViewElement TextViewElement

4 posts, 0 answers
  1. Jo
    Jo avatar
    4 posts
    Member since:
    Apr 2014

    Posted 09 Jul 2014 Link to this post

    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.
  2. Daniel
    Daniel avatar
    17 posts
    Member since:
    Oct 2013

    Posted 13 Jul 2014 Link to this post

    i encountered same problem, how to hide or collapsed the TextViewElement, any work around, i need to show the GraphiclViewElement only.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 14 Jul 2014 Link to this post

    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.
     
  5. Daniel
    Daniel avatar
    17 posts
    Member since:
    Oct 2013

    Posted 14 Jul 2014 in reply to Dess Link to this post

    Thank you Desislava
Back to Top