Forum Stats

  • 3,815,802 Users
  • 2,259,087 Discussions
  • 7,893,240 Comments

Discussions

Checkbox column in Interactive Grid?

M.Emmanuel
M.Emmanuel Member Posts: 304
edited Jan 26, 2017 1:52PM in APEX Discussions

I have used Interactive Grid for first time.

I see a nice checkbox in the selector column (the first one).

pastedImage_0.png

If I have another column where I specify checkbox I got a different checkbox:

pastedImage_1.png

Plus once edited I get just the returned value displayed.

Which would be the best way to implement this in the new 5.1 Interactive Grid?

Thanks,

Answers

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,812 Red Diamond
    edited Dec 26, 2016 10:39AM
    M.Emmanuel wrote:I have used Interactive Grid for first time.I see a nice checkbox in the selector column (the first one).
    pastedImage_0.png

    If I have another column where I specify checkbox I got a different checkbox:

    pastedImage_1.png

    Plus once edited I get just the returned value displayed.

    Which would be the best way to implement this in the new 5.1 Interactive Grid?

    Best way to implement what in the new 5.1 Interactive Grid? No obvious problem has been identified.

  • M.Emmanuel
    M.Emmanuel Member Posts: 304
    edited Dec 27, 2016 7:16PM

    The difference in style between both Checkboxes is obvious, that poses a problem.

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,812 Red Diamond
    edited Dec 28, 2016 6:47AM
    M.Emmanuel wrote:The difference in style between both Checkboxes is obvious, that poses a problem.

    The difference between the checkboxes is that they are implemented in completely different ways. The row header selector is represented by a Font APEX icon:

    ::before<span class="a-GV-rowSelector">  ::before  <input class="a-GV-rowSelect" tabindex="-1" type="checkbox"></span>

    with the checkbox control itself hidden using CSS:

    .a-GV-rowSelector .a-GV-rowSelect {  border: 0;  clip: rect(0 0 0 0);  height: 1px;  margin: -1px;  overflow: hidden;  padding: 0;  position: absolute;  width: 1px;}

    The editable column checkbox is rendered using the standard browser/platform input control:

    <fieldset tabindex="-1" id="C2808497228689156742" class="checkbox_group apex-item-checkbox js-ignoreChange">  <legend class="u-VisuallyHidden">On Leave</legend>  <input type="checkbox" id="C2808497228689156742_0" name="2808497228689156742" value="Y" class="js-tabbable" tabindex="-1">  <label for="C2808497228689156742_0">Y</label></fieldset>

    "Obviously" this is not considered to be a problem by Oracle or they wouldn't have done things in this way. Perhaps @John Snyders-Oracle can explain this inconsistency.

  • John Snyders-Oracle
    John Snyders-Oracle Member Posts: 1,428 Employee
    edited Dec 29, 2016 4:15PM

    Hi,

    Currently there is no [column] item type that works like the row selector. The row selector is a very special case not really an item type in the same sense as text field or radio group.

    Keep in mind that there are two modes with IG navigation mode and editing mode. The row selector is special in a number of ways including because it can be "checked" (as already pointed out not a real checkbox input) to perform selection while in navigation mode. It makes sense given the way IG works that in edit mode a checkbox item would be a checkbox that you can interact with but when in navigation mode it would just show its display value.

    In theory a simple checkbox item plugin that works with IG could be created but exactly what its behavior should be is not clear. I'm not sure it would work the way you expect.

    If you are looking for something that is always a checkbox that you can always interact with I would say that its is not supported or intended at least not in an editable grid. It is something that we should give more thought to. Please provide more details on your use case.

    Regards,

    -John

  • Evie-Oracle
    Evie-Oracle Member Posts: 69 Employee
    edited Jan 3, 2017 1:32PM

    Just looking into this thread after I had similar question.

    I can definitely provide my case, if that will help support the cause of why a checkbox-looking checkbox is needed in IG, even when in navigation mode. It can safely be rendered readonly when not in Edit mode, but making it show a value like Y or N in navigation mode is just making the view too crowded.

    I have tabular forms with 3-5 checkboxes per row/record and currently desperately experimenting to make use of this solution of yours: APEX Interactive Report Checkbox Row Selection | HardLikeSoftware with some amendments (as I really have to store these values in the database and there is not just one per record)

    In my case, I am tracking SRs and bugs, and by each SR or bug I need to be able to say eg: Active (Y/N), Escalated(Y/N), Showstopper(Y/N), 24*7 (Y/N) and few more .. When it shows Y or N, it is much more difficult to find the Ys for example - I know I could possibly sort the column, but then I am losing the other view which in my case is more important (I have eg the SRs sorted by Milestone date, even having a control break).

    So if need be I could provide a screenshot of my tabular form as an example of what it looks like in the tabular form. All I need is a Simple checkbox that stays a checkbox also in navigation mode

    cheers

    Evelina

  • oos1970
    oos1970 Member Posts: 23
    edited Jan 23, 2017 2:31PM

    If you have a report (ir or classic). You can show the checkbox as a font-apex by making a simple case when and then as value select the font-apex between <span> class="fa fa-icon"</span>.

    Is it possible to do the same when the grid is not in edit mode? With javascript?

  • oos1970
    oos1970 Member Posts: 23
    edited Jan 23, 2017 3:33PM

    Diving into this. I may have a solution:

    Don't use the checkbox. But use the switch instead. You can customize the display value and the return value in the column itself.

    But in the shared components go to component settings. There you can define the default settings. Including display style as switch.

    switch.png

    switch settings.png

    customize column in grid

    diplay in grid.png

    display on screen

    edit in grid.png

    switch between customized values in edit mode.

    Hope this helps.

    Regards,


    Marco.

  • [Deleted User]
    [Deleted User] Posts: 0 Green Ribbon
    edited Jan 23, 2017 4:36PM

    Hi,

    For my taste that's not the wise way.

    Also see: https://community.oracle.com/thread/4009734

    What about translation for different languages?

    For a "simple" checkbox you don't need to translate anything.

    Everyone can understand the message of a empty or filled checkbox.

    From my point of view a (nother) case of re-thinking :-)

    Regards

    Andre

  • oos1970
    oos1970 Member Posts: 23
    edited Jan 26, 2017 2:53AM

    Hello andreml,

    Of course when you have multiple languages in your application this will not work. And I agree with you that a simple checkbox as in tabular form is much more preferable.

    Still, I think using the switch in the way I mentioned can be a nice work-around if your application has 1 language. Although I too hope that the APEX team will change the appearance  of the checkbox in the GRID to that of a checkbox.

    Regards,

    Marco.

  • Evie-Oracle
    Evie-Oracle Member Posts: 69 Employee
    edited Jan 26, 2017 1:52PM

    I've gone this route .. If it were just displaying a checkmark, it is pretty simple.

    But when you have to edit, and then later save a value based on the state, that is not that great fun.

    As John Nyders suggested on another thread, someone has to write a plug-in.

    The Switch option suggested in this thread is a workaround, but it is not nice

This discussion has been closed.