Individual expand a treeview DW

Using Win7, PB11.5 2506

Hello,

I have a treeview datawindow with 4 levels. The User can expand and collapse 
like he wants to.

For printing the datawindow I do a sharedata to a print treeview datawindow 
(only the design differs).

In the print dw all groups are expanded to the default expand level of the 
primary datawindow.

It seems to me that the expand states isnt' part of the sharing.

So how can I set the same expand state for the print dw as in the primary 
datawindow.

I know there is a IsExpanded() function - but should I call the function for 
each row and level? I'm sure there
is a better solution.

Thank you for help
Martin 

0
Martin
12/20/2010 12:11:43 PM
sybase.powerbuilder.datawindow 28057 articles. 5 followers. Follow

3 Replies
1711 Views

Similar Articles

[PageSpeed] 32

Hi Martin;

  The ShareData () only shares the data buffer not the state. However, all 
you need to do is use the ExpandAll ( ) method on the print DWO before 
printing it.

HTH

Regards ... Chris
President: OSUG / STD Inc.
Blog: http://chrispollach.blogspot.com
PBDJ: http://chrispollach.sys-con.com
SourceForge: http://sourceforge.net/projects/stdfndclass

"Martin"  wrote in message news:4d0f47ff$1@forums-1-dub...

Using Win7, PB11.5 2506

Hello,

I have a treeview datawindow with 4 levels. The User can expand and collapse
like he wants to.

For printing the datawindow I do a sharedata to a print treeview datawindow
(only the design differs).

In the print dw all groups are expanded to the default expand level of the
primary datawindow.

It seems to me that the expand states isnt' part of the sharing.

So how can I set the same expand state for the print dw as in the primary
datawindow.

I know there is a IsExpanded() function - but should I call the function for
each row and level? I'm sure there
is a better solution.

Thank you for help
Martin 

0
Chris
12/20/2010 2:35:40 PM
Thanks for reply, but I don't want to expand all groups, but only the rows 
that the user before expanded by clicking!


"Chris Pollach"  schrieb im Newsbeitrag news:4d0f69bc$1@forums-1-dub...

Hi Martin;

  The ShareData () only shares the data buffer not the state. However, all
you need to do is use the ExpandAll ( ) method on the print DWO before
printing it.

HTH

Regards ... Chris
President: OSUG / STD Inc.
Blog: http://chrispollach.blogspot.com
PBDJ: http://chrispollach.sys-con.com
SourceForge: http://sourceforge.net/projects/stdfndclass

"Martin"  wrote in message news:4d0f47ff$1@forums-1-dub...

Using Win7, PB11.5 2506

Hello,

I have a treeview datawindow with 4 levels. The User can expand and collapse
like he wants to.

For printing the datawindow I do a sharedata to a print treeview datawindow
(only the design differs).

In the print dw all groups are expanded to the default expand level of the
primary datawindow.

It seems to me that the expand states isnt' part of the sharing.

So how can I set the same expand state for the print dw as in the primary
datawindow.

I know there is a IsExpanded() function - but should I call the function for
each row and level? I'm sure there
is a better solution.

Thank you for help
Martin 

0
Martin
12/20/2010 3:12:09 PM
Ahhh... OK, then you will have to loop through the primary DW's buffer and 
test each row using the IsExpanded ( ) method and then apply the same 
expansion to the secondary DWO using the Expand ( ) method. Laborious, but 
that is the only way I know of doing it.



"Martin"  wrote in message news:4d0f7249$1@forums-1-dub...

Thanks for reply, but I don't want to expand all groups, but only the rows
that the user before expanded by clicking!


"Chris Pollach"  schrieb im Newsbeitrag news:4d0f69bc$1@forums-1-dub...

Hi Martin;

  The ShareData () only shares the data buffer not the state. However, all
you need to do is use the ExpandAll ( ) method on the print DWO before
printing it.

HTH

Regards ... Chris
President: OSUG / STD Inc.
Blog: http://chrispollach.blogspot.com
PBDJ: http://chrispollach.sys-con.com
SourceForge: http://sourceforge.net/projects/stdfndclass

"Martin"  wrote in message news:4d0f47ff$1@forums-1-dub...

Using Win7, PB11.5 2506

Hello,

I have a treeview datawindow with 4 levels. The User can expand and collapse
like he wants to.

For printing the datawindow I do a sharedata to a print treeview datawindow
(only the design differs).

In the print dw all groups are expanded to the default expand level of the
primary datawindow.

It seems to me that the expand states isnt' part of the sharing.

So how can I set the same expand state for the print dw as in the primary
datawindow.

I know there is a IsExpanded() function - but should I call the function for
each row and level? I'm sure there
is a better solution.

Thank you for help
Martin 

0
Chris
12/20/2010 3:29:26 PM
Reply: