1. Pete Yankovich
  2. PowerBuilder
  3. Wednesday, 12 August 2020 15:27 PM UTC

I have two questions:

- I have a new datawindow control/object.  The Row Selection Service is turned on, but I don't want rows to be highlighted.  I've done some research, but haven't found how to do this.

- Can individual datawindow row's height be set dynamically?

Any help would be appreciated.

Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 13 August 2020 00:43 AM UTC
  2. PowerBuilder
  3. # 1


Updated:

Create a computed COLUMN (not a computed field) in the SQL of the SOURCE called row_hieght init to 56 (or whatever value you wish).

Set the height of each column inthe DETAIL band to row_height.
Set the height of the detail band to row_height.

Set rowheight from your script when required on the rows required.

Be sure that all of those columns and the ban have their AUTOHEIGHT set to ON. Set the columns to SLIDE ALL UP.

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Create a computed COLUMN (not a computed field) in the SQL of the SOURCE called row_hieght init to zero.

Have a function that sets all of the columns in the band to row_height. Also change the height of the band itself.

Be sure that all of those columns and the ban have their AUTOHEIGHT set to ON. Set the columns to SLIDE ALL UP.

While your code is running, if the row height needs to change, call the function, then ReDraw the window.


Good Luck,

Olan

Comment
  1. Pete Yankovich
  2. Thursday, 13 August 2020 11:53 AM UTC
Thanks, Olan.



I've tried this:

ls_mod_rc = this.Modify("detail.height='796 ~t if(fl_split=1,796,600)' "), where fl_split is the conditional column.



The return from Modify is "Line 1 Column 14: incorrect syntax." I've never understood what that message means.
  1. Helpful
  1. René Ullrich
  2. Thursday, 13 August 2020 11:56 AM UTC
You can't use an expression for height of the detail band. Try to use an expression for height of an object in detail band and autosize height for the detail band.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 13 August 2020 01:51 AM UTC
  2. PowerBuilder
  3. # 2

Greetings, Pete -

From the wording of your question, can I assume your app utilizes the PFC? If so, what version of the PFC libraries are you using? What version/release of PB are you using? Classic PB app? PowerServer Web? When you ask questions like you raise, it really helps us to know some details of your development and deployment environments.

Regards, John

Comment
  1. Pete Yankovich
  2. Thursday, 13 August 2020 11:42 AM UTC
I'm using PB 2017R2, classic app and not sure of the PFC version. It was deployed with the 2017R2 install.

But, I have an additional challenge. I have a datawindow where I want to filter the dddw's in columns in each row based on other values in the row. I haven't found an acceptable solution thus far.
  1. Helpful
  1. John Fauss
  2. Thursday, 13 August 2020 13:52 PM UTC
I have an extension to the PFE-layer for selecting a SINGLE row using the PFC's row selection service without highlighting the row that I can make available, if you want. Let me know.

As for your additional requirement, I suggest you post a separate question to avoid question clutter. It will also give your question better visibility to the Community. Please consider describing a simple example in your question to illustrate, for I'm not 100% sure exactly what your new requirement entails. I and others in the community want to help, but we don't necessarily want to respond to questions with guesses..
  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Thursday, 13 August 2020 05:12 AM UTC
  2. PowerBuilder
  3. # 3

Hi Pete,

RowSelectionService uses the Datawindow SelectRow function that highlights the rows. The only way I know to change the hightlight are Themes (but I'm not sure if this works for all datawindow styles).

If you need a completly different approach you have to implement it youself.

For setting different row heights for the details band you could use the Datawindow SetDetailHeight function.

HTH,

René

Comment
  1. Pete Yankovich
  2. Thursday, 13 August 2020 11:56 AM UTC
But, will SetDetailHeight set height of all rows? I want the detail height to be conditioned on a column value in the row.
  1. Helpful
  1. René Ullrich
  2. Thursday, 13 August 2020 12:01 PM UTC
You can use SetDetailHeight to set different heights for each row if you want. But it doesn't have an automatic.

If you want to have a height that depends from content the autosizeheight feature is propably better.
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 13 August 2020 13:36 PM UTC
  2. PowerBuilder
  3. # 4

Renee is correct.

Updated:

Create a computed COLUMN (not a computed field) in the SQL of the SOURCE called row_height init to 56 (or whatever value you wish).

Set the height of each column in the DETAIL band to row_height.
Set the height of the detail band to row_height.

Set row_height from your script when required on the rows required.

Be sure that all of those columns and the ban have their AUTOHEIGHT set to ON. Set the columns to SLIDE ALL UP.

After changing the row_height value, dw.SetRedraw (TRUE).

 

Olan

Comment
There are no comments made yet.
Pete Yankovich Accepted Answer Pending Moderation
  1. Thursday, 13 August 2020 16:05 PM UTC
  2. PowerBuilder
  3. # 5

Olan,

Refer to attachment for screen shot of dw painter.  Height is set to 800.

In constructor of dw control, I've got this statement.  I hard-coded the default height for testing.  The return from Modify is good ("").

ls_mod_rc = this.Modify("datawindow.detail.height=320")

I want to hide the circled columns initially and then increase height if split ticket check box is checked.  There's code to do this in itemchanged event.

Bottom line, it's not working.

 

Attachments (1)
Comment
  1. Olan Knight
  2. Monday, 24 August 2020 13:12 PM UTC
I don't think you can adjust the height of ONE column in the detail band when there is more than one column in the detail band.



How about using the VISIBLE property of the column instead?
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 24 August 2020 13:57 PM UTC
  2. PowerBuilder
  3. # 6

Hi Pete;

Suggestion: Good for thought ....

 I would turn off the PFC service. Then use the "optional" SetRowFocusIndicator() method along with the plain SetRow() command.

Regards ... Chris

Comment
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.