1. mahmoud mahmoud
  2. PowerBuilder
  3. Monday, 13 March 2023 21:04 PM UTC

Hello everyone 

I need help please 


I need keep collapsed or expanded groups of rows in datawindow ttree when I save it as psr file and open it at another datawindow 

Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 14 March 2023 21:40 PM UTC
  2. PowerBuilder
  3. # 1

Yeah, PDFs have pretty much rendered the PSRs obsolete. However....

Another option is to keep track of each NODE of the tree and it's state (expanded or collapsed) in an array, then when you open the second DW"

dw_2.SetRedraw (FALSE)

// bulk copy the data  from dw_1 into dw_2
// - the easiest case is when the contents are identical, then you can ShareData between the DWs.

FOR (ll_node = 1 TO ll_num_of_nodes)

   lb_expanded = lb_node_state_array [ll_node]

   IF (lb_expanded) THEN
      // Expand the node
      // collapse the node


There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 13 March 2023 21:24 PM UTC
  2. PowerBuilder
  3. # 2

Hi Mahound;

   The PSR is the "original" DWO source plus the DWO's primary data buffer. It does not track the state of the Tree itself. Thus, when your PSR is imported into another DW Control, the tree will open collapsed.

    Saving the Treeview DWO though to a PDF will preserve the current "state" of the tree.

Regards ... Chris 

There are no comments made yet.
  • Page :
  • 1

There are no replies made for this question yet.
However, you are not allowed to reply to this question.