Gridfield NED but selectable

Author: roger.wallin@abilita.fi (rogerw)

Hi,

How to make a field (fex. EditBox) of a grid "NED", selectable (for copying) and double-clickable (possible in a normal entity editbox) ?

Or if I have to make it editable, how to avoid having to triple-click to activate Detail?

  Regards RogerW.

 

5 Comments

  1. Hello RogerW,

    not sure, how about Uniface9, but in Uniface8 there is a bug 26611:

    BUG 26611:  Unable to select and copy data from a grid widget cell if field is non-editable


    Description:
     If the syntax of a field is set to NED, than it is impossible to select and
     copy data from it if the field is displayed in a grid widget.

     This does not occur with normal form fields.


    Solution:

     When an editbox is defined in a grid display as non-editable and the focus is
     set to that field, the field was not changed into an actual editbox. This made
     it impossible to select the text. After bug 26611 the field will be displayed
     as an real editbox with the no-update option and makes it possible to select
     the text for "COPY" actions.
     

    Hopefully, this would be helpful, (or is this bug solve only in U8 but not in U9?)
    Zdenek


    Author: sochaz (zdenek.socha@fullsys.cz)
  2. Hi,

    in U8 we had set this fields to editable, but in SMOD Trigger we had put a return (-1).

    So the user  can select the content and copy it, but can not change it.

    To avoid a doubleclick you can add also some code and set $fieldproperties (if it is accessable or not).

    I know it is coding solution, but in our cases it helps.

    Best regards

    Thomas


    Author: Thomas.Young (thomas.young@young-consulting.de)
  3. Hi,

    Ok, making it editable and return(-1) in SMOD-trigger solves the copying part.
    But I still have to triple-click to activate DETAIL, although the "Double Click"-property is set to "Detail". It seems that the first click is needed to set the focus to the field and then there is still needed a double-click, ie. a triple-click if the field doesn't have focus. This isn't the default behaviour for a normal editbox. Is this perhaps a bug for a Uniface 9.4 (r101) grid?

    Regards RogerW. 

     


    Author: rogerw (roger.wallin@abilita.fi)
  4. Hi RogerW,

    I'm afraid the described behavior is not actually a bug, but a limitation of the current Grid widget and it is not version 9.4 specific, but also can be seen in (e.g.) Uniface 9.3. Here's the official explanation from our engineers:

    "The first click is required to set focus to the record and only then the record has the editboxes available and is in a state where it can handle double clicks. We investigated the possibility of implicitly setting focus on a double click but the methods to do that would be unreliable and would result in inconsistent behavior. Also making all editboxes available at first load of the grid is not an option because that would drain the Windows resources for larger grids."

    Hope this helps.

    Best regards,
    Daniel

    *** Usual disclaimer ***


    Author: diseli (daniel.iseli@uniface.com)
  5. Ok,

    we have to live with it. Unfortunately there is an inconcistency with NED grid-editboxes (same with NoEditBoxes) and of course nongrid editboxes. I have to decide wether to make all grid-editboxes editable SMOD-return(-1) and demand a triple-click or just live with the inconsistency. Sometimes triple-click, sometimes double-click.  

    Regards RogerW.

     


    Author: rogerw (roger.wallin@abilita.fi)