1. Steen Jakobsen
  2. PowerBuilder
  3. Saturday, 18 September 2021 06:14 AM UTC

Hi,

 

It seems that datawindow coumns autosize does not work. (Pb 2019 r3)

I have tried many combinations including the one in the link below.

Autosize Width of Grid DataWindow Columns | Appeon Website

 

Does this feature work at all ?

 

Thanks Steen

Roland Smith Accepted Answer Pending Moderation
  1. Saturday, 18 September 2021 15:19 PM UTC
  2. PowerBuilder
  3. # 1

I have a code example that does auto width for grid DataWindows:

https://www.topwizprogramming.com/freecode_dwgridxp.html

It also handles sorting and will add a background shadow to the current sort column.

 

Comment
  1. Steen Jakobsen
  2. Saturday, 4 December 2021 07:25 AM UTC
Cool,

Thanks Roland :-)
  1. Helpful 1
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Sunday, 19 September 2021 02:11 AM UTC
  2. PowerBuilder
  3. # 2

Would you be willing to export the grid DataWindow you are experiencing an issue with, zip the .srd file and attach the zip file in a response so that we can import and inspect the DataWindow?

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 20 September 2021 14:42 PM UTC
  2. PowerBuilder
  3. # 3

Hi Steen;

   I just tried this on a few test DWO's of mine and the ASW works great.

I tested this feature using PB 2019R3 build 2728 on W10 version 21H1 build 19043.1237.

Regards ... Chris

Comment
There are no comments made yet.
Matt Balent Accepted Answer Pending Moderation
  1. Monday, 20 September 2021 19:36 PM UTC
  2. PowerBuilder
  3. # 4

I've used it without issue since R3 was out of beta.

Comment
There are no comments made yet.
Steen Jakobsen Accepted Answer Pending Moderation
  1. Friday, 3 December 2021 06:49 AM UTC
  2. PowerBuilder
  3. # 5

Sorry for my late reply.

I almost gave up on this.

I jyst cannot get any autosizing to work and never had been able to. So obviously i'm doing something wrong :-) 

Can anyone provide a dw example where this works ?

Comment
  1. Miguel Leeuwe
  2. Saturday, 4 December 2021 13:37 PM UTC
Before anyone (like me) tries to make a sample: You marked this as resolved, so ... it wasn't ? Also, did you try Roland's example https://www.topwizprogramming.com/freecode_dwgridxp.html? Didn't it work?

regards
  1. Helpful
There are no comments made yet.
Matt Balent Accepted Answer Pending Moderation
  1. Wednesday, 8 December 2021 14:41 PM UTC
  2. PowerBuilder
  3. # 6

This is how I have done it:

First you modify the column to set Autosize to 0 then modify it again to 3 as this snippit from my method shows:

// '0' = do not autosize
ls_modify = as_colname + ".Width.Autosize = '0'"
ls_value = THIS.Modify(ls_modify)
// '3' = widest value in result set
ls_modify = as_colname + ".Width.Autosize = '3'"
ls_value = THIS.Modify(ls_modify)

 

I have used Roland's method in the past and it works well too.

 

Matt

 

Comment
  1. Steen Jakobsen
  2. Friday, 17 December 2021 11:02 AM UTC
Hi Matt,



Thank you so much. It works PERFECT! :-)
  1. Helpful
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.