Home Forums Presentation Controls Which event is fired when I uncheck a checkbox in the grid?

Viewing 1 reply thread
  • Author
    Posts
    • #6475
      Rafael ReisRafael Reis
      Participant

      I have a check box in a grid that is generate by the framework when I set the “format” to “shortBoolean” but I don’t know which event is fired when I uncheck the combo box.

      0
    • #6484
      Ed ShawEd Shaw
      Keymaster

      I see no responses yet from UI experts so here is a quick guess on my part that will be followed up with a better answer by someone else I’m sure.

      I believe when you click on the column you will get a sysSelect event raised from, for instance, the source (EntityList grdEntity) and you can inspect the parameter argument for perhaps more info.

      In addition, you should be able to create a custom UIEvent (e.g. myGridColEvent) and then set the event property of your column to myGridColEvent. Then create a UIAction that responds to your event.

      I hope this helps a bit. I’m not near a working dev environment to exactly confirm.

      1
      • This reply was modified 7 years, 12 months ago by Ed ShawEd Shaw.
      • #6492
        Owen PondOwen Pond
        Participant

        The simplest approach is the one suggested by Ed above.

        “…you should be able to create a custom UIEvent (e.g. myGridColEvent) and then set the event property of your column to myGridColEvent. Then create a UIAction that responds to your event.”

        There is perhaps a more “correct” approach but it requires more work. It involves the following.

        1. Set the grid column to “refreshAlways”.

        You’ll need to modify the form’s script with a line similar to the following.

        ((this’findView ‘(columnName))’refreshAlways #t)

        2. Create a data action to listen for a change in the boolean value that you are concerned with.

        <DataAction association=”Your Attribute Name” condition=”(= locator ‘attribute)” constant=”false”>

        <Script><![CDATA[ your logic ]]></Script>

        </DataAction>

         

        The reason that we set the grid column to refresh always is to force the data action to fire on the server in real time. Otherwise the data action will fire, assuming that you are working in a popup, when the popup closes.

        0
        • This reply was modified 7 years, 12 months ago by Owen PondOwen Pond.
        • This reply was modified 7 years, 12 months ago by Owen PondOwen Pond.
        • This reply was modified 7 years, 12 months ago by Owen PondOwen Pond.
        • This reply was modified 7 years, 12 months ago by Owen PondOwen Pond.
        • #6504
          Rafael ReisRafael Reis
          Participant

          I am sorry, but I meant check box, not combo box.

          0
          • #6512
            Ed ShawEd Shaw
            Keymaster

            Got that – no confusion. The answers are geared towards the checkbox.

            0
          • #6519
            Rafael ReisRafael Reis
            Participant

            I tried your solution, but it didn’t work. I need to know when the user actually unselected the check box than will display a dialog to confirm his action, if the user choose YES it would actually uncheck the box, otherwise it would just stay as checked.

            0
          • #6529
            Owen PondOwen Pond
            Participant

            Attached is an example which does what i think that you want to do. You will need to create a popup based on the provided screen in order to test the example. This example does the following:

            1. Displays a list of instances in a grid.
            2. If you un-select a check box in the grid, you are presented with a yes/no message box to confirm your action.
            3. If you select no, the check box remains selected.

            2
            • This reply was modified 7 years, 12 months ago by Owen PondOwen Pond.
            Attachments:
            You must be logged in to view attached files.
          • #6539
            Rafael ReisRafael Reis
            Participant

            thank you, that works! đŸ™‚

            0
Viewing 1 reply thread
  • You must be logged in to reply to this topic.