Setting properties on a widget within a grid
Posted: Thu Nov 18, 2021 9:19 am
I wrote a javascript function that allows us to hide or disable widgets or tabs on any UI by placing the id name of the widget (and other key fields) in a table on the iSeries. This function is called in the onLoad() event for the record format. I use the applyProperty() function for the widgets and the getObj("tabname").hideTab() function for the tabs. This is working great.
The issue I cannot figure out is how can I use JavaScript to hide/disable widgets that are defined within a grid? My plan was to retrieve the number of rows in the grid and then loop through the rows and hide/disable the widget but I cannot find a function that will allow me to apply a property to a widget within a grid. I saw a method [getObj("Grid1").grid.getDataValue(1, "CUSTID")] that retrieves the data but nothing that allows me to set the properties.
Is there a function that will allow me to do this or some other way to do this?
Thanks,
-Rich
The issue I cannot figure out is how can I use JavaScript to hide/disable widgets that are defined within a grid? My plan was to retrieve the number of rows in the grid and then loop through the rows and hide/disable the widget but I cannot find a function that will allow me to apply a property to a widget within a grid. I saw a method [getObj("Grid1").grid.getDataValue(1, "CUSTID")] that retrieves the data but nothing that allows me to set the properties.
Is there a function that will allow me to do this or some other way to do this?
Thanks,
-Rich