Application Studio - Hide or reorder columns programatically (By column name, not index)

Hi,

I’ve been enjoying Application Studio but there are some things that doesn’t seems possible right now. For example, I would like, when clicking on a button, to reorder the grid columns as I wish and show / hide certains columns so the layout is always the same, even if the user customized their grid

I know that you can do some changes with the property-set event:

  • Enter the component id
  • In props, enter: gridModel.columns[0].hidden
  • Value: false
    That hides the column at index 0

However, that assumes that the column is always at the index 0 (or whatever index I put there). But if a user drags a column to be the first column in their grid, the column at index 0 changes. So, there doesn’t seems to be a way to say ‘I want to hide column JobNum’ for example

I can’t think of any way to do it via Application Studio because the property-set doesn’t even work if I put variable in there (gridModel.columns[{sysGlobalVariable.index}].hidden where index = 0)

1 Like