Hide Column at RunTime

Help
2009-02-13
2012-12-13
  • mauro larese
    mauro larese
    2009-02-13

    I have a grid inside a form.
    I have to hide or show a column of the grid according to a field value.

    I tried with   

    textColumn.setVisible(false)

    then
    textColumn.setColumnVisible(false)

    i tried adding

    grid.doLayout();

    but no way.
    Any solution Thank you

     
    • mcarniel
      mcarniel
      2009-02-14

      Properties available in Column subclasses can be used only BEFORE showing grid.
      After grid has been showed, you can only use GridControl methods.

      I've added a setVisibleColumn method to GridControl. This improvement will be available with next relase of OpenSwing, planned for next week