Detect inline checkbox "All" of a grid (or how to forbid the click)

Certified Senior Developer

Hi,

I've coded a mecanism to validate the inline checkbox autorization in a grid, but now I need to ensure the user can't click on the All checkbox.

Is it possible ? if not, is it possible to detect that the user has clicked on that All checkbox (without comparing the count of checked rows with the total rows count) ?

Regards 

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    What's your use case exactly?  This is fairly easy to do when dealing with grids where you're enforcing that only one item can be selected; it'll be slightly harder (due mainly to more complicated corner cases) if you're dealing with one where you want to allow multi selection.  In short, you can manipulate the saveInto such that it intercepts the new value and tests how many items have been selected, and generally if the new selection is greater than 1 item, disregard the new selection.

  • 0
    Certified Senior Developer
    in reply to Mike Schmitt

    Thank you Mike.

    Yes I'm allowing the multi-selection to the user. I am detected each checked action, one per one, to analyse quantity of business value of each row (linked to some other external conditions).
    When the condition is not met for this line, the checked action is forbidden (so I cancel and disregard the checked box and remove data from objects selection).

    As you said, I made all that mecanim in the selectionSaveInto and it works fine.
    Unfortunately, for the checkALL, I have to change plenty of things to maintain that mecanim, and I find the code very loud for such a little thing.

    I was hoping just an event to intercept, because my selectionSaveInto code will be huge, and very difficult to maintain.

  • 0
    Certified Senior Developer
    in reply to cedric01

    if disable the check ALL had been a possible option, it would make the things easier but it is not possible.
    So probably, I have to get rid of checkbox and just keep the ROW_HIGHLIGHT as it is advised here :
    community.appian.com/.../editable-grid

  • 0
    Certified Lead Developer
    in reply to cedric01

    Honestly you could make either work, unless you're specifically worried about users being confused by the nonworking "select all" checkbox (which i've never had that big of an issue with).  Is your scenario single-select or multi-select?

Reply Children