Uniface User Forum

 View Only
  • 1.  Grid status save

    Posted 02-08-2021 20:49

    Hi Unifacers,

    I've spent one full day behind this to find the right combination to have it working.

    Could anyone explain if there is/are any specific technical reason(s) because status of a grid widget is NOT saved to registry when a column/field defined into visible part of the entity is going to be hidden either with:
    - VISIBLE more attribute set (static, old mode)
    - $columnsyntax(fieldName) = "HID"
    - collapsing a column to size equal zero via grid user interface

    ColumnSize = 0, in a way or another, is just a real useful option, a concrete use case, depending from application objects state.
    It should be NOT too difficult to save value 0 for a columnName, restoring it directly hidden next time.
    A small utility managing the registry could enable to restore columns hidden by mistake.

    Regards,
    Gianni



  • 2.  RE: Grid status save

    Posted 02-10-2021 09:27

    Hi Gianni,

    The described behavior is documented:

    > Uniface Reference > Widget Reference > Widget Reference: Forms and Reports > egrid (Grid)

    See paragraph about "Layout Management":

    "The column sizes are stored in the registry and are automatically restored the next time the form is started. However, the layout of the grid is only stored when all columns have a size. This ensures that columns that may have been hidden (by $columnsyntax) are visible when the form is restarted. Row heights are not restored."

    I hope this helps.

    Regards,
    Daniel



  • 3.  RE: Grid status save

    Posted 02-10-2021 10:23

    Hi Daniel,

    thanks for your reply.

    Yes, I know it is documented but the issue here is that we are mixing two different functionalities and one of them very useful requires a tricky programming mode to continue to be available.
    I try to explain myself better: initially we got complain from a customer because grid status was not saved anymore, so we spent time alltogether to understand the exact perimeter of the functionality.
    We found a working solution but IMHO it is not what I / We would like to have.

    Basically we have two different needs:
    - Program needs (static VISIBLE into grid "More property" or programmatically $columnsyntax(columnName) = "HID")
    - User needs (User1 wants to collapse Price while User2 wants to collapse Quantity)

    To have both solved same time for ALL user into one form we were forced to:
    - Substitute all static VISIBLE with programmatically $columnsyntax()
    - Substitute all columnsyntax() (old and new) with a routine forcing column to be programmatically visually hidden just being 1px wide
    - Implement a control over user resizing a column to forcing it 3px wide

    In this way:
    - All users can restore their collapsed column (saved into registry HKCurrentUser) because 3 px wide are still visually recognizable, are supporting user needs and are not disturbing the visual behaviour
    - Programmers can hide a column when they need it

    Alltogether we feel is a little bit tricky...We would prefer:
    1) Uniface should save also hidden columns with size = 0 and restore them directly hidden
    2) When clicking over the grid origin square a small utility could show the list of painted fields (ALL!) enabling to restore them visible (in this utility programmer could DIM/disable those fields the program MUST control!)

    Question is:
    could a property be added to grid to enable saving it also when one or more column(s) size is equal 0 ?

    Regards,
    Gianni

    P.S. I had this same item discussed with Theo Neeskens a couple of years ago as soon as U9.7 was released; it can still be read from Google cache here.



  • 4.  RE: Grid status save

    Posted 02-10-2021 16:44

    Hi Gianni,

    Thanks for your detailed explanation. It seems that this should be a wish - and when I check the mentioned link from Google cache then you apparently already have created one in the past. Unfortunately the old wish-list was not transferred when we moved the uniface.info (or what is now community.uniface.com) site. Sorry about that.

    It probably is best if you copy the details from Google cache and create a new wish. This seems to be the appropriate way to get this recognized by a wider audience.

    I hope this helps.

    Thanks,
    Daniel



  • 5.  RE: Grid status save

    Posted 02-11-2021 08:24

    Hi Daniel,

    the wish is now recorded into current wishlist with code UNP-107.
    If more details are needed let me know.

    Regards,
    Gianni



  • 6.  RE: Grid status save

    Posted 02-11-2021 11:25

    Thanks Gianni.