Sorting multiple subfiles at once

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
DanD
Profound User
Posts: 42
Joined: Wed Jun 14, 2017 12:06 pm
First Name: Dan
Last Name: Devoe
Company Name: Boston Warehouse Trading
State / Province: Massachusetts
Zip / Postal Code: 02062
Country: United States
Contact:

Sorting multiple subfiles at once

Post by DanD »

This is an expansion of this topic - I thought that this is deviating too much from that topic, and thought it would be best to start a new topic.

I'm trying to emulate a subfile where the first few columns appear to be "frozen", allowing certain information not to disappear from view, when the end-user is scrolling to the right.

I would like the ability to sort either subfile - but because of the technique used to emulate "freezing" certain columns is utilizing two subfiles, the sort (and other functions such as filter) doesn't work as intended.

Is there a way, after sorting, that the opposite subfile can be read and sorted in the same fashion (via JS) - either by utilizing the subfile row from the subfile that was sorted, or via a common field between the two subfiles? In order to facilitate Export to Excel to work properly, the "frozen" fields are also in the "non-frozen" subfile, with a column width of 0 (so the fields aren't truly hidden), so the Excel export should include them. Therefore, there are common fields between the 2 subfiles.

Thanks
-Dan
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Sorting multiple subfiles at once

Post by Scott Klement »

No, as far as Profound UI is concerned you have two separate subfiles. Sorting/filtering one will not affect the other. Even if we added new JavaScript events to let you run code when one is sorted it wouldn't help, since each subfile is it's own entity and doesn't know about the other's data, so can't sort/filter the same way.

The only solution that I can think of would be to do the sorting in the server-side (most likely RPG) program. This is done with the "column sort response" property. When you click the column to sort it, the column number (starting with 0) will be put into the field you bind to the column sort response and control will be returned to your RPG program. The RPG program can then re-load both subfiles sorted by the appropriate column (just as you would do in green-screen).
DanD
Profound User
Posts: 42
Joined: Wed Jun 14, 2017 12:06 pm
First Name: Dan
Last Name: Devoe
Company Name: Boston Warehouse Trading
State / Province: Massachusetts
Zip / Postal Code: 02062
Country: United States
Contact:

Re: Sorting multiple subfiles at once

Post by DanD »

Scott,

Thank you for the reply. Your answer was along the lines of what I anticipated.

But I figured it wouldn't hurt to ask.
-Dan
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests