Facility Control

 View Only
  • 1.  Change current selection in struct table

    Posted 09-07-2018 18:21
    Hi all!

    Looking for a way to set the current selection in a table programmatically (rather than having to click on it) as the actual table is not always visible.

    Something along the lines of:

    params.getParam('myTable').selectedIndex = myIndex;

    or:

    params.getParam('myTable',myIndex).selected = true;

    Is this possible?

    CJ



  • 2.  RE: Change current selection in struct table

    Posted 09-07-2018 19:08
    You're using a struct param, right?
    In this case, you'll want to set the w.selectionparam config option and create an INT parameter to take the selection. Then, to change the selection programmatically, you just need to set the value of the parameter.
    #DashBoard


  • 3.  RE: Change current selection in struct table

    Posted 09-07-2018 19:10
    <param expand="true" height="308" left="17" oid="OID_OF_TABLE" showlabel="false" top="17" width="448">
          <config key="w.selectionparam">OID_OF_PARAMETER_FOR_SELECTION</config>
          <config key="w.columns">identifier,name,position</config>
       </param>

    #DashBoard


  • 4.  RE: Change current selection in struct table

    Posted 09-07-2018 19:31
    Doh! I should've known that one. I'm using w.selectionparam quite a lot in my panel! I guess I didn't realize that it was a 2-way value.

    Thanks as always, James!

    CJ

    #DashBoard