Katalogerna
PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


GTP.NET FAQ 10944


gridNode.Expanded = true doesnt seem to be work in Gantt_ASP? Please note that this article refers to the GTP.NET
Jump to article- 2007-07-17 12:34:00 - Email plexityHide

Question

I have multiple rows on the GTP grid, where each row can have any number of child rows. It should be possible for the user to set which rows need to be expanded and which need not. However, the gridNode.Expanded = true doesnt seem to be working.
Also, its been noticed that in web component, all the rows are always collapsed when its loaded. Please provide pointers on what needs to be done.

Answer

Expanded/Collapsed state is stored in ViewState. So in order to change the client view it is not enough to set the GridNode.Expanded state.
You must instead use Gantt_ASP.Get/SetExpandedStatusForGridNode


    public bool GetExpandedStatusForGridNode(GridNode aGridNode)

Can be used in PageLoad more or less like this (This code does not check for postback so it will the effect that collapse appear not to work) 

      Gantt_ASP1.Gantt.Grid.Refresh(); // Makesure the grid is rendered and the datasources get initiated
      foreach (GridNode gn in Gantt_ASP1.Gantt.Grid.RootNodes)
      {
        Gantt_ASP1.SetExpandedStatusForGridNode(gn,true);
      }

 

Google
WWW plexityHide GTP.NET FAQ
Support

Support intro

Knowledgebase

FAQ phGantTimePackage

FAQ GTP.NET

FAQ general

Testimonials

"This is too GREAT. I must say you have strong support and really good programmers at your place. Your entire team is good. Just Fantastic! – 100%"
Gaurav Patole,
WebTechDevelopers
More testimonials...