Auto Select only record retrieve from Relational Grid Widget in Form

I wish to know if there is a way to auto select the only record retrieve from the Relational Grid Widget when the form with the Widget is loaded

  • Suggested Answer

    0

    Assuming that the Relational Grid Widget is using a multi-something field and that it's on a Transition form, you can add a form action that runs the 2 statements below in JavaScript after the form loads:


    jQuerySBM('a:contains("Unselect All")')[0].click();
    jQuerySBM('a:contains("Select All")')[0].click();

    What those do:

    The first line finds all "Anchor" elements that display the text "Unselect All" (upper/lower case is important!!), then extracts the first element, then simulates the user clicking that link.  Basically it will simulate the user clicking the "Unselect All" link under the Widget.

    The second line simulates the user clicking the "Select All" link under the Widget.

  • 0   in reply to 

     I like this idea!